auth

package
v0.0.0-...-e786615 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WellKnownJWKSJSON

func WellKnownJWKSJSON() (string, error)

WellKnownJWKSJSON OpenID standard public JWT signature keys

func WellKnownOpenIDConfig

func WellKnownOpenIDConfig() (string, error)

WellKnownOpenIDConfig OpenID standard config

Types

type JWKS

type JWKS struct {
	Keys []jwk.Key `json:"keys"`
}

JWKS contains a list of public keys

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

LoginRequest is used to unmarshal the simple login payload

type OpenIDConfig

type OpenIDConfig struct {
	Issuer                           string   `json:"issuer"`
	AuthorizationEndpoint            string   `json:"authorization_endpoint"`
	TokenEndpoint                    string   `json:"token_endpoint"`
	JWKSURI                          string   `json:"jwks_uri"`
	ResponseTypesSupported           []string `json:"response_types_supported"`
	SubjectTypesSupported            []string `json:"subject_types_supported"`
	IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
	RequireRequestURIRegistration    string   `json:"require_request_uri_registration"`
	UserinfoEndpoint                 string   `json:"userinfo_endpoint"`
	RegistrationEndpoint             string   `json:"registration_endpoint"`
	ScopesSupported                  []string `json:"scopes_supported"`
	ClaimsSupported                  []string `json:"claims_supported"`
}

OpenIDConfig well known public OpenID config.

type TokenPayload

type TokenPayload struct {
	Token string `json:"token"`
}

TokenPayload is a simple struct to return the JWT token as json.

func Login

func Login(ctx context.Context, domain string, headers map[string]string, body string) (TokenPayload, error)

Login ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL