oidc

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoEndSessionEndpoint = errors.New("this_oidc_provider_does_not_support_end_session_endpoint")
	ErrInvalidState         = errors.New("invalid_state")
	ErrInvalidNonce         = errors.New("invalid_nonce")
	ErrInvalidCodeChallenge = errors.New("invalid_code_challenge")
	ErrInvalidIdToken       = errors.New("invalid_id_token")
	ErrRetrieveUserInfo     = errors.New("error_retrieve_user_info")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(
	ctx context.Context,
	sessionService contracts.SessionService,
	providerUrl string,
	clientID string,
	clientSecret string,
	redirectURL string,
	scopes []string,
) (*Client, error)

func (*Client) ExchangeCodeForToken

func (c *Client) ExchangeCodeForToken(ctx *web.Context, code string, state string) (*oauth2.Token, *oidc.IDToken, error)

func (*Client) GetCodeVerifierAndRemoveFromSession

func (c *Client) GetCodeVerifierAndRemoveFromSession(ctx *web.Context) (string, error)

func (*Client) RPInitiatedLogout

func (c *Client) RPInitiatedLogout(ctx *web.Context, postLogoutRedirectURI string) (string, error)

func (*Client) RedirectURL

func (c *Client) RedirectURL(ctx *web.Context) (string, error)

func (*Client) SetNeedToVerifyNonce

func (c *Client) SetNeedToVerifyNonce(needToVerifyNonce bool)

func (*Client) SetNeedToVerifyState

func (c *Client) SetNeedToVerifyState(needToVerifyState bool)

func (*Client) SetPKCEEnabled

func (c *Client) SetPKCEEnabled(isPKCEEnabled bool)

func (*Client) UserInfo

func (c *Client) UserInfo(ctx context.Context, t *oauth2.Token) (*oidc.UserInfo, error)

func (*Client) UserInfoEndpoint

func (c *Client) UserInfoEndpoint() string

Jump to

Keyboard shortcuts

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