provider

package
v0.0.2 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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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