auth

package
v0.7.20 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// SharedSecretKey shared secret key for signing a token
	SharedSecretKey = "SHARED_SECRET_KEY"
	// OIDCServerURL - will be accessed as Environment variable
	OIDCServerURL = "OIDC_SERVER_URL"
	// OpenidConfiguration is the discovery point on the OIDC server
	OpenidConfiguration = ".well-known/openid-configuration"
	// HS prefix for HS family algorithms
	HS = "HS"
	// RS prefix for RS family algorithms
	RS = "RS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// Authenticate authenticate a given string token
	Authenticate(string) (jwt.MapClaims, error)
}

Authenticator an authenticator interface to implement different authentication methods

type JwtAuthenticator

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

JwtAuthenticator jwt authenticator

func (*JwtAuthenticator) ParseAndValidate added in v0.6.10

func (j *JwtAuthenticator) ParseAndValidate(tokenString string) (jwt.MapClaims, error)

ParseAndValidate parse a jwt string token and validate it

Jump to

Keyboard shortcuts

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