openid

package
v0.0.0-...-f08f74e Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDiscoveryURL

func BuildDiscoveryURL(realmID string) string

BuildDiscoveryURL helper function

Types

type AuthenticationProvider

type AuthenticationProvider struct {
	Config   oauth2.Config
	Provider *oidc.Provider
}

AuthenticationProvider leverages oauth2.Config and *oidc.Provider to perform OAuth 2.0 and OpenID Connect protocol related functions

func NewAuthenticationProvider

func NewAuthenticationProvider(discoveryURL string) *AuthenticationProvider

NewAuthenticationProvider creates a new OAuth2 OpenID Connect Provider

func (*AuthenticationProvider) Exchange

func (p *AuthenticationProvider) Exchange(ctx context.Context, code string) (*oauth2.Token, error)

Exchange -

func (*AuthenticationProvider) Verify

func (p *AuthenticationProvider) Verify(ctx context.Context, rawIDToken string) (*oidc.IDToken, error)

Verify -

Jump to

Keyboard shortcuts

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