provider

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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 ExchangeRequest struct {
	Code         string
	RedirectURL  string
	CodeVerifier string
	Nonce        string
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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