Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProviderURL string ClientID string ClientSecret string RedirectURL string Scopes []string Enabled bool }
Config defines the configuration used for the authentication middleware and the token verifier
type ContextKey ¶
type ContextKey string
ContextKey is used to store the auth context value in the request context
type Provider ¶
type Provider struct { Verifier *oidc.IDTokenVerifier Disabled bool // contains filtered or unexported fields }
Provider stores the runtime configuration and verifier for the authorizer and the middleware
func NewProvider ¶
NewProvider creates a new OIDC provider instance
func (*Provider) AuthorizeHandler ¶
func (p *Provider) AuthorizeHandler(w http.ResponseWriter, r *http.Request)
AuthorizeHandler validates the authentication code from the client and returns a access token as a response
func (*Provider) EchoAuthorizeHandler ¶
func (p *Provider) EchoAuthorizeHandler() echo.HandlerFunc
EchoAuthorizeHandler returns a wrapped http handler for the echo router
func (*Provider) EchoMiddleware ¶
func (p *Provider) EchoMiddleware() echo.MiddlewareFunc
EchoMiddleware returns an instance of the Middleware wrapped for Echo
type Session ¶
Session is used to store authentication data as a context value
func GetSession ¶
GetSession is a helper function to return the session struct stored in the request context