oidc

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseToken

func ParseToken(idToken, clientSecret string) (*jwt.Token, error)

ParseToken returns a jwt token from an idToken, returns error if it cannot parse

Types

type OAuth2Token

type OAuth2Token interface {
	Exchange(ctx context.Context, code string) (*oauth2.Token, error)
}

OAuth2Token is an interface which is used when exchanging an id_token for an access token

type Token

type Token struct {
	OAuth2Cfg *oauth2.Config
}

Token is an implementation of OAuth2Token Interface

func (*Token) Exchange

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

Exchange takes an oauth2 auth token and exchanges for an id_token

Jump to

Keyboard shortcuts

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