simple

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access interface {
	Access(req *request.AccessRequest) (*response.AccessResponse, error)
}

func NewAccess

func NewAccess(s *SimpleServer) Access

type Authorize

type Authorize interface {
	Login(req *request.AuthorizeRequest) (*response.AuthorizeResponse, error)
	Register(req *request.AuthorizeRequest) (res *response.AuthorizeResponse, err error)
	Authorization(req *request.AuthorizeRequest) (*response.AuthorizeResponse, error)
}

func NewAuthorize

func NewAuthorize(s *SimpleServer) Authorize

type Info

type Info interface {
	Info(req *request.InfoRequest) (*response.AccessResponse, error)
}

func NewInfo

func NewInfo(s *SimpleServer) Info

type SimpleServer

type SimpleServer struct {
	Config        *config.SimpleConfig
	AuthorizeCode face.AuthorizeCode
	AccessToken   face.AccessToken
	Now           func() time.Time
	Logger        log.Logger
}

Server is an OAuth2 implementation

func NewSimpleServer

func NewSimpleServer(config *config.SimpleConfig) *SimpleServer

NewServer creates a new server instance

type Token

type Token interface {
	AuthorizationToCode(authorization string) (string, error)
}

func NewToken

func NewToken() Token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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