authentication

package
v0.0.0-...-cc1019e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

README

The authentication mechanisme rely on a submodule linked to the middleware via a ZMQ connexion

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(req *http.Request) (string, error)

func RequireTokenAuthentication

func RequireTokenAuthentication(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)

Types

type JWTAuthenticationBackend

type JWTAuthenticationBackend struct {
	PublicKey *rsa.PublicKey
	// contains filtered or unexported fields
}

func InitJWTAuthenticationBackend

func InitJWTAuthenticationBackend() *JWTAuthenticationBackend

func (*JWTAuthenticationBackend) Authenticate

func (backend *JWTAuthenticationBackend) Authenticate(user *models.User) bool

func (*JWTAuthenticationBackend) GenerateToken

func (backend *JWTAuthenticationBackend) GenerateToken(userUUID string) (string, error)

func (*JWTAuthenticationBackend) IsInBlacklist

func (backend *JWTAuthenticationBackend) IsInBlacklist(token string) bool

func (*JWTAuthenticationBackend) Logout

func (backend *JWTAuthenticationBackend) Logout(tokenString string, token *jwt.Token) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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