oidc

package
v0.0.0-...-19697ae Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientStore

type ClientStore map[string]oidcClient

func NewClientStore

func NewClientStore(configs map[string]config.OIDCClient) (ClientStore, error)

func (ClientStore) AuthHandler

func (c ClientStore) AuthHandler(providerID string, state string) (http.HandlerFunc, error)

func (ClientStore) CodeExchangeHandler

func (c ClientStore) CodeExchangeHandler(providerID string) (CodeExchangeHandlerFunc, error)

Returns a http handler that will receive the authorization code from the identity provider. swap it for an access token and then pass the access and refresh token to the callback function.

func (ClientStore) RefreshAccessToken

func (c ClientStore) RefreshAccessToken(ctx context.Context, refreshToken models.AuthToken) (models.AuthTokenSet, error)

func (ClientStore) UserProfileURL

func (c ClientStore) UserProfileURL(providerID string) (*url.URL, error)

type CodeExchangeHandlerFunc

type CodeExchangeHandlerFunc func(callback TokenSetCallback) http.HandlerFunc

type TokenSetCallback

type TokenSetCallback func(tokenSet models.AuthTokenSet) error

Jump to

Keyboard shortcuts

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