Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationRequest ¶
type AuthorizationRequest struct {
RedirectURL string `` /* 158-byte string literal not displayed */
ProviderURL string `json:"-"`
State string `` /* 134-byte string literal not displayed */
Scope string `` /* 136-byte string literal not displayed */
Nonce string `json:"nonce,omitempty" jsonschema:"Optional nonce forwarded to OIDC-capable providers." example:"n-0S6_WzA2Mj"`
CodeChallenge string `` /* 154-byte string literal not displayed */
CodeChallengeMethod string `` /* 140-byte string literal not displayed */
LoginHint string `` /* 175-byte string literal not displayed */
}
func (AuthorizationRequest) ScopeList ¶
func (req AuthorizationRequest) ScopeList() []string
type AuthorizationResponse ¶
type AuthorizationResponse struct {
RedirectURL string
}
type ExchangeRequest ¶
type Provider ¶
type Provider interface {
// Key returns the stable provider key.
Key() string
// PublicConfig returns the safe-to-expose client configuration.
PublicConfig() schema.PublicClientConfiguration
// HTTPHandler returns the provider-owned browser handler for caller-defined mounts.
HTTPHandler() httprequest.PathItem
// BeginAuthorization starts the browser authorization flow.
BeginAuthorization(context.Context, AuthorizationRequest) (*AuthorizationResponse, error)
// ExchangeAuthorizationCode converts a code into a normalized identity,
// which can be inserted into the database and used to issue local session tokens.
ExchangeAuthorizationCode(context.Context, ExchangeRequest) (*schema.IdentityInsert, error)
}
Provider defines the browser and code-exchange hooks for an identity provider.
Click to show internal directories.
Click to hide internal directories.