auth

package
v0.0.0-...-9de7e9e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
}

func (*Auth) VerifyAdmin

func (a *Auth) VerifyAdmin(r *http.Request) bool

type AuthUser

type AuthUser interface {
	VerifyUser(r *http.Request) bool
	VerifyAdmin(r *http.Request) bool
}

type JwtToken

type JwtToken struct {
	Token *jwt.Token
}

func (*JwtToken) GenerateToken

func (j *JwtToken) GenerateToken(Id int64, Role int) string

func (*JwtToken) ParseToken

func (j *JwtToken) ParseToken(r *http.Request) (*jwt.Token, error)

Jump to

Keyboard shortcuts

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