Documentation ¶
Index ¶
- Constants
- type Authenticator
- type AuthenticatorContext
- type AuthenticatorRequest
- type AuthenticatorResult
- type BearerAuthenticator
- type BearerAuthenticatorConfig
- type BrowserLauncher
- type ExecBrowserLauncher
- type ExternalAuthenticator
- type ExternalAuthenticatorConfig
- type OAuthAuthenticator
- type OAuthAuthenticatorConfig
- type PatAuthenticator
- type SecretGenerator
Constants ¶
View Source
const LOGGED_IN_PAGE_HTML = `` /* 2413-byte string literal not displayed */
View Source
const TokenRoute = "/connect/token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface {
Auth(ctx AuthenticatorContext) AuthenticatorResult
}
type AuthenticatorContext ¶
type AuthenticatorContext struct { Type string `json:"type"` Config map[string]interface{} `json:"config"` Debug bool `json:"debug"` Insecure bool `json:"insecure"` Request AuthenticatorRequest `json:"request"` }
func NewAuthenticatorContext ¶
func NewAuthenticatorContext( authType string, config map[string]interface{}, debug bool, insecure bool, request AuthenticatorRequest) *AuthenticatorContext
type AuthenticatorRequest ¶
type AuthenticatorRequest struct { URL string `json:"url"` Header map[string]string `json:"header"` }
func NewAuthenticatorRequest ¶
func NewAuthenticatorRequest( url string, header map[string]string) *AuthenticatorRequest
type AuthenticatorResult ¶
type AuthenticatorResult struct { Error string `json:"error"` RequestHeader map[string]string `json:"requestHeader"` Config map[string]interface{} `json:"config"` }
func AuthenticatorError ¶
func AuthenticatorError(err error) *AuthenticatorResult
func AuthenticatorSuccess ¶
func AuthenticatorSuccess(requestHeader map[string]string, config map[string]interface{}) *AuthenticatorResult
type BearerAuthenticator ¶
func (BearerAuthenticator) Auth ¶
func (a BearerAuthenticator) Auth(ctx AuthenticatorContext) AuthenticatorResult
type BearerAuthenticatorConfig ¶
func NewBearerAuthenticatorConfig ¶
func NewBearerAuthenticatorConfig( clientId string, clientSecret string, identityUri *url.URL) *BearerAuthenticatorConfig
type BrowserLauncher ¶ added in v1.0.8
type ExecBrowserLauncher ¶ added in v1.0.8
type ExecBrowserLauncher struct{}
func (ExecBrowserLauncher) OpenBrowser ¶ added in v1.0.8
func (l ExecBrowserLauncher) OpenBrowser(url string) error
type ExternalAuthenticator ¶
type ExternalAuthenticator struct {
Config ExternalAuthenticatorConfig
}
func (ExternalAuthenticator) Auth ¶
func (a ExternalAuthenticator) Auth(ctx AuthenticatorContext) AuthenticatorResult
type ExternalAuthenticatorConfig ¶
func NewExternalAuthenticatorConfig ¶
func NewExternalAuthenticatorConfig( name string, path string) *ExternalAuthenticatorConfig
type OAuthAuthenticator ¶ added in v1.0.1
type OAuthAuthenticator struct { Cache cache.Cache BrowserLauncher BrowserLauncher }
func (OAuthAuthenticator) Auth ¶ added in v1.0.1
func (a OAuthAuthenticator) Auth(ctx AuthenticatorContext) AuthenticatorResult
type OAuthAuthenticatorConfig ¶ added in v1.0.1
type OAuthAuthenticatorConfig struct { ClientId string RedirectUrl url.URL Scopes string IdentityUri *url.URL }
func NewOAuthAuthenticatorConfig ¶ added in v1.0.1
type PatAuthenticator ¶ added in v1.0.2
type PatAuthenticator struct{}
func (PatAuthenticator) Auth ¶ added in v1.0.2
func (a PatAuthenticator) Auth(ctx AuthenticatorContext) AuthenticatorResult
type SecretGenerator ¶ added in v1.0.1
type SecretGenerator struct{}
func (SecretGenerator) GeneratePkce ¶ added in v1.0.1
func (g SecretGenerator) GeneratePkce() (string, string)
func (SecretGenerator) GenerateState ¶ added in v1.0.1
func (g SecretGenerator) GenerateState() string
Source Files ¶
- authenticator.go
- authenticator_context.go
- authenticator_request.go
- authenticator_result.go
- bearer_authenticator.go
- bearer_authenticator_config.go
- browser_launcher.go
- exec_browser_launcher.go
- external_authenticator.go
- external_authenticator_config.go
- identity_client.go
- identity_response.go
- oauth_authenticator.go
- oauth_authenticator_config.go
- oauth_authenticator_html.go
- pat_authenticator.go
- secret_generator.go
- token_request.go
- token_response.go
Click to show internal directories.
Click to hide internal directories.