rest

package
v0.0.0-...-04ccc7c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: AGPL-3.0 Imports: 24 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTokenClaims = errors.New("invalid token claims")
	GuestRole             = "gst"
)

Functions

func NewAuthService

func NewAuthService(authConfig config.AuthConfig) core.AuthService

func NewCommunicator

func NewCommunicator(auth core.AuthService, config config.CommonConfig) core.InnerCommunicator

func NewRequestParams

func NewRequestParams(r *http.Request) *meta.RequestParams

Types

type AuthMiddleware

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

func NewAuthMiddleware

func NewAuthMiddleware(service core.AuthService) *AuthMiddleware

func (*AuthMiddleware) Authenticator

func (m *AuthMiddleware) Authenticator(next http.Handler) http.Handler

func (*AuthMiddleware) Authorizer

func (m *AuthMiddleware) Authorizer(next http.Handler) http.Handler

func (*AuthMiddleware) UserSetter

func (m *AuthMiddleware) UserSetter(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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