oidcx

package
v0.0.0-...-421db18 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssuerGoogle = "https://accounts.google.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuth2Handler

type OAuth2Handler struct {
	IDToken        *oidc.IDToken
	IDClaims       *json.RawMessage
	UserInfo       *oidc.UserInfo
	UserInfoClaims *json.RawMessage
	OAuth2Token    *oauth2.Token
	// contains filtered or unexported fields
}

func (*OAuth2Handler) AuthCodeURL

func (h *OAuth2Handler) AuthCodeURL(opts ...oauth2.AuthCodeOption) string

func (*OAuth2Handler) ServeHTTP

func (h *OAuth2Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Provider

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

func NewProvider

func NewProvider(id string, issuer string) (*Provider, error)

func (*Provider) NewClientCredentialsConfig

func (p *Provider) NewClientCredentialsConfig(secret string, scopes []string, params map[string]string) *clientcredentials.Config

func (*Provider) NewOAuth2Config

func (p *Provider) NewOAuth2Config(secret string, redirectUrl string, scopes []string) *oauth2.Config

func (*Provider) NewOAuth2Handler

func (p *Provider) NewOAuth2Handler(c *oauth2.Config) *OAuth2Handler

func (*Provider) UserInfo

func (p *Provider) UserInfo(ctx context.Context, source oauth2.TokenSource) (*oidc.UserInfo, error)

func (*Provider) Verifier

func (p *Provider) Verifier() *oidc.IDTokenVerifier

type Token

type Token struct {
	oauth2.Token
}

Jump to

Keyboard shortcuts

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