auth

package
v0.0.0-...-bcbc1e1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserCtxKey = &ctxKey{name: "user"}

UserCtxKey is the context key for users

Functions

This section is empty.

Types

type Auth0JWKS

type Auth0JWKS struct {
	Keys []struct {
		Alg string   `json:"alg"`
		Kty string   `json:"kty"`
		Use string   `json:"use"`
		N   string   `json:"n"`
		E   string   `json:"e"`
		Kid string   `json:"kid"`
		X5T string   `json:"x5t"`
		X5C []string `json:"x5c"`
	} `json:"keys"`
}

type Auth0OpenID

type Auth0OpenID struct {
	Issuer                            string   `json:"issuer"`
	AuthorizationEndpoint             string   `json:"authorization_endpoint"`
	TokenEndpoint                     string   `json:"token_endpoint"`
	UserinfoEndpoint                  string   `json:"userinfo_endpoint"`
	MfaChallengeEndpoint              string   `json:"mfa_challenge_endpoint"`
	JwksURI                           string   `json:"jwks_uri"`
	RegistrationEndpoint              string   `json:"registration_endpoint"`
	RevocationEndpoint                string   `json:"revocation_endpoint"`
	ScopesSupported                   []string `json:"scopes_supported"`
	ResponseTypesSupported            []string `json:"response_types_supported"`
	CodeChallengeMethodsSupported     []string `json:"code_challenge_methods_supported"`
	ResponseModesSupported            []string `json:"response_modes_supported"`
	SubjectTypesSupported             []string `json:"subject_types_supported"`
	IDTokenSigningAlgValuesSupported  []string `json:"id_token_signing_alg_values_supported"`
	TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
	ClaimsSupported                   []string `json:"claims_supported"`
	RequestURIParameterSupported      bool     `json:"request_uri_parameter_supported"`
	DeviceAuthorizationEndpoint       string   `json:"device_authorization_endpoint"`
}

type AuthMiddleware

type AuthMiddleware struct {
	ORM *orm.ORM
	// contains filtered or unexported fields
}

func CreateMiddleware

func CreateMiddleware(serverConfig *utils.ServerConfig, orm *orm.ORM) AuthMiddleware

func (*AuthMiddleware) Authorize

func (m *AuthMiddleware) Authorize(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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