Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoOAuth2State = errors.New("no oauth2 state provided") ErrNoOAuth2Code = errors.New("no oauth2 code provided") ErrCouldNotRetrieveToken = errors.New("could not retrieve token") ErrSessionNotFound = errors.New("session not found") ErrNoJWTReturned = errors.New("no jwt returned") )
Errors
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProviderUrl string `kong:"prefix='oauth2-',help='Url of oauth2 provider',alias='oidc',env='OAUTH2_PROVIDER_URL'"` ClientID string `kong:"prefix='oauth2-',help='Oauth2 client id to use',env='OAUTH2_CLIENTID',alias='cid'"` ClientSecret string `kong:"prefix='oauth2-',help='Oauth2 client secret to use',env='OAUTH2_CLIENT_SECRET',alias='cis'"` LoginCallbackUrl string `kong:"prefix='oauth2-',help='Redirect url after successful login',env='OAUTH2_LOGIN_CALLBACK_URL'"` }
Config values for authentication
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) RegisterEndpoint ¶
type LoginResponse ¶
LoginResponse represents the answer to a login request
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) WithConfig ¶
WithConfig sets up stuff from the config
func (*Options) WithLogger ¶
WithLogger sets the logger for the server
Click to show internal directories.
Click to hide internal directories.