verifier

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package verifier provides a token verifier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenVerifier added in v0.9.4

type AccessTokenVerifier interface {
	Verify(ctx context.Context, token string, claims interface{}, opt Option) error
}

AccessTokenVerifier verifies jwt access tokens or access token to userinfo, used in lib/auth.

func NewAccessTokenVerifier added in v0.9.4

func NewAccessTokenVerifier(ctx context.Context, issuer string, useUserinfoVerifier bool) (AccessTokenVerifier, error)

NewAccessTokenVerifier creates a access tok verifier.

type JWTAccessTokenVerifier added in v0.9.10

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

JWTAccessTokenVerifier verifies jwt access tokens, used in lib/auth.

func (*JWTAccessTokenVerifier) Verify added in v0.9.10

func (s *JWTAccessTokenVerifier) Verify(ctx context.Context, token string, claims interface{}, opt Option) error

Verify verifies signature, timestamp, issuer and audiences in access tok.

type Option added in v0.9.4

type Option interface {
	// contains filtered or unexported methods
}

Option for verifies tokens.

func AccessTokenOption added in v0.9.4

func AccessTokenOption(clientID, self string, useAzp bool) Option

AccessTokenOption for verifier aud/azp claims.

type PassportVerifier added in v0.9.4

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

PassportVerifier verifies passport tokens.

func NewPassportVerifier added in v0.9.4

func NewPassportVerifier(ctx context.Context, issuer, clientID string) (*PassportVerifier, error)

NewPassportVerifier creates a passport token verifier.

func (*PassportVerifier) Verify added in v0.9.4

func (s *PassportVerifier) Verify(ctx context.Context, token string) error

Verify verifies signature, timestamp, issuer and audiences in passport token.

type UserinfoAccesssTokenVerifier added in v0.9.10

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

UserinfoAccesssTokenVerifier verifies access tokens with userinfo endpoint, used in lib/auth.

func (*UserinfoAccesssTokenVerifier) Verify added in v0.9.10

func (s *UserinfoAccesssTokenVerifier) Verify(ctx context.Context, token string, claims interface{}, opt Option) error

Verify verifies signature, timestamp, issuer and audiences of access token with userinfo.

type VisaVerifier added in v0.9.4

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

VisaVerifier verifies visa tokens.

func NewVisaVerifier added in v0.9.4

func NewVisaVerifier(ctx context.Context, issuer, jku, prefix string) (*VisaVerifier, error)

NewVisaVerifier creates a visa token verifier.

func (*VisaVerifier) Verify added in v0.9.4

func (s *VisaVerifier) Verify(ctx context.Context, token, jku string) error

Verify signature, timestamp, issuer, jku and audiences in visa token.

Jump to

Keyboard shortcuts

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