controllers

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllUsersResponse

type AllUsersResponse struct {
	Users []backends.User `json:"users"`
}

type AuthController

type AuthController struct {
	AB                 backends.Authentication
	SecretKey          []byte
	JWTExpirationDelta int
	Enabled            bool
}

func GetNewAuthenticationController

func GetNewAuthenticationController(authBackend backends.Authentication, secretKey []byte, exp int, enabled bool) *AuthController

GetNewAuthenticationController - returns a pointer to initialised AuthController

func (*AuthController) GetAllUsersHandler

func (a *AuthController) GetAllUsersHandler(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

GetAllUsersHandler - returns a list of all users

func (*AuthController) Login

func (a *AuthController) Login(w http.ResponseWriter, r *http.Request)

func (*AuthController) Logout

func (*AuthController) RefreshToken

func (a *AuthController) RefreshToken(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Jump to

Keyboard shortcuts

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