auth

package module
v0.0.0-...-c29a018 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(ctx context.Context) (*oidc.Provider, error)

func NewRemoteKeySet

func NewRemoteKeySet(ctx context.Context, provider *oidc.Provider) (oidc.KeySet, error)

func NewTokenSource

func NewTokenSource(ctx context.Context, provider *oidc.Provider) oauth2.TokenSource

func WrapTransport

func WrapTransport(base http.RoundTripper, source oauth2.TokenSource) *oauth2.Transport

Types

type Token

type Token struct {
	jwt.Claims
	Roles map[string][]string `json:"roles.omitempty"`
}

type Validator

type Validator struct {
	KeySet oidc.KeySet
}

func (*Validator) Verify

func (v *Validator) Verify(ctx context.Context, token string) (t *Token, err error)

Jump to

Keyboard shortcuts

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