auth

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = errors.New("Invalid token")

Functions

func ParseToken

func ParseToken(header string) (string, error)

ParseToken extracts token from a header: 'type token' or 'token'

Types

type Token

type Token interface {
	GetValue() string

	User() (*User, error)

	GetUserName() string
}

type User

type User struct {
	Email    string
	Password string
	APIKey   string
}

func GetUserByEmail

func GetUserByEmail(email string) (*User, error)

Jump to

Keyboard shortcuts

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