tokens

package
v0.0.46 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccount added in v0.0.32

func GetAccount(ctx context.Context) *v1.Account

func Set added in v0.0.32

func Set(ctx context.Context, claims *Claims) context.Context

func SetAccount added in v0.0.32

func SetAccount(ctx context.Context, a *v1.Account) context.Context

func Valid added in v0.0.24

func Valid(priv ed25519.PrivateKey, token string, method scopes.Scope) (ok bool)

Types

type Basic added in v0.0.32

type Basic struct {
	Username string
	Password string
}

func (Basic) GetRequestMetadata added in v0.0.32

func (b Basic) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

func (Basic) RequireTransportSecurity added in v0.0.32

func (Basic) RequireTransportSecurity() bool

type Claims added in v0.0.39

type Claims struct {
	jwt.RegisteredClaims
	Scopes scopes.List
}

func Get added in v0.0.32

func Get(ctx context.Context) *Claims

func NewClaims added in v0.0.39

func NewClaims(scopeStr string, claims jwt.RegisteredClaims) (claim *Claims, err error)

func ValidWithClaims added in v0.0.26

func ValidWithClaims(priv ed25519.PrivateKey, token string, method scopes.Scope) (claims *Claims, ok bool)

func (*Claims) ValidFor added in v0.0.39

func (c *Claims) ValidFor(scope scopes.Scope) bool

type Source added in v0.0.32

type Source string

func (Source) GetRequestMetadata added in v0.0.32

func (s Source) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

func (Source) RequireTransportSecurity added in v0.0.32

func (Source) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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