authentication

package
v0.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EXPIRATION_TIME = 15000
View Source
var SIGNING_KEY = "AllYourBase"

Functions

func AuthorizationMiddleware

func AuthorizationMiddleware(c *routing.Context) error

func AuthorizeTokenHandler

func AuthorizeTokenHandler(c *routing.Context) error

func GenerateToken

func GenerateToken(username string, password string) (string, error)

func GetTokenHandler

func GetTokenHandler(c *routing.Context) error

func InitGAPIAuthenticationServer

func InitGAPIAuthenticationServer(router *routing.Router)

func NotAllowed

func NotAllowed(c *routing.Context) error

func ValidateToken

func ValidateToken(tokenString string) error

func ValidateUserCredentials

func ValidateUserCredentials(username string, password string) error

Types

type TokenRequestObj

type TokenRequestObj struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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