ident

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownIdentType occurs when identification type in unknown
	ErrUnknownIdentType = errors.New("unknown identification type")

	// ErrEmptyAuth occurs when authorization content is not found
	ErrEmptyAuth = errors.New("empty authorization content")

	// ErrMalformedAuth occurs when authorization content is malformed
	ErrMalformedAuth = errors.New("malformed authorization content")

	// ErrInvalidState occurs when state is not consistent
	ErrInvalidState = errors.New("invalid state provided for oauth")

	// ErrInvalidCode occurs when code is no valid
	ErrInvalidCode = errors.New("invalid code provided for oauth")
)

Functions

This section is empty.

Types

type Auth

type Auth interface {
	GetName() string
	GetUser(context.Context, string) (*model.User, error)
	Redirect(http.ResponseWriter, *http.Request)
	Login(*http.Request) (string, error)
	OnLoginError(http.ResponseWriter, *http.Request, error)
}

Auth is a provider of identification methods

type Service

type Service interface {
	GetUser(context.Context, string) (*model.User, error)
	OnError(http.ResponseWriter, *http.Request, error)
}

Service provide methods for dealing with identification

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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