grpc

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NilTokenValidatorError = errors.New("token validator cannot be nil")
)

Functions

This section is empty.

Types

type DefaultTokenValidator

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

DefaultTokenValidator struct

func NewDefaultTokenValidator

func NewDefaultTokenValidator(
	authTokenSource *oauth.TokenSource,
	authClient pbauth.AuthClient,
	redisTokenValidator commonredisauth.TokenValidator,
) (*DefaultTokenValidator, error)

NewDefaultTokenValidator creates a new default token validator

func (*DefaultTokenValidator) IsTokenValid

func (d *DefaultTokenValidator) IsTokenValid(
	token string,
	jwtId string,
	isRefreshToken bool,
) (bool, error)

IsTokenValid checks if the token is valid

type TokenValidator

type TokenValidator interface {
	IsTokenValid(token string, jwtId string, isRefreshToken bool) (bool, error)
}

TokenValidator interface

Jump to

Keyboard shortcuts

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