ident

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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