auth

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// SharedSecretKey shared secret key for signing a token
	SharedSecretKey = "SHARED_SECRET_KEY"
)

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{}

JwtAuthenticator jwt authenticator

func (*JwtAuthenticator) Authenticate

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

Authenticate parse a jwt string token and authenticate it

Jump to

Keyboard shortcuts

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