auth

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middelware

func Middelware(next http.Handler, authorizers ...Authorizer) http.Handler

Types

type AuthorizeWrapper

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

func NewAuthorizeWrapper

func NewAuthorizeWrapper(authorizers ...Authorizer) *AuthorizeWrapper

func (*AuthorizeWrapper) Authorize

type Authorizer

type Authorizer interface {
	AuthorizerCode() string
	Authorize(w http.ResponseWriter, r *http.Request) (string, *model.User, *model.Account, error)
}

Directories

Path Synopsis
Package elogin provides auth middle procedures for remote authentication including oauth2 and other protocols, and specific providers like google, facebook, etc.
Package elogin provides auth middle procedures for remote authentication including oauth2 and other protocols, and specific providers like google, facebook, etc.
serverprovider/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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