basic

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App of the package

func New

func New(userLogin UserLogin) App

New creates new App from Config

func (App) GetUser

func (a App) GetUser(content string) (model.User, error)

GetUser returns User found in content header

func (App) IsMatching

func (a App) IsMatching(content string) bool

IsMatching checks if header content match provider

func (App) OnError

func (a App) OnError(w http.ResponseWriter, _ *http.Request, err error)

OnError handles HTTP request when login fails

type UserLogin

type UserLogin interface {
	// Login user with its credentials
	Login(string, string) (model.User, error)
}

UserLogin login user based on its credentials

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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