authentication

package
v0.0.0-...-ad98ba4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(password, hash string) error

Authenticate login

func Authorize

func Authorize(o Owner, issuer string) (string, error)

Authorize is used to request token

Types

type Owner

type Owner struct {
	ID           int    `json:"id"`
	ProfileID    int    `json:"profile_id"`
	EmailAddress string `json:"email_address"`
	Role         string `json:"role"`
}

Owner is an authorized user

func Token

func Token(tokenString string, roles []string) (Owner, error)

Token authentication

Jump to

Keyboard shortcuts

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