accesstoken

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider of Access Token

func New

func New(dp dataprotection.Provider, parser jwt.Parser) *Provider

New returns new Provider

func (*Provider) ParseToken

func (p *Provider) ParseToken(ctx context.Context, token string, cfg *jwt.VerifyConfig) (jwt.MapClaims, error)

Claims returns claims from the Access Token, or nil if `auth` is not Access Token

func (*Provider) Protect

func (p *Provider) Protect(ctx context.Context, claims jwt.MapClaims) (string, error)

Protect returns AccessToken from claims

Jump to

Keyboard shortcuts

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