auth

package
v0.0.0-...-1f910d1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeaderXUserID = "X-User-Id"

Functions

func NewBasicAuthValidator

func NewBasicAuthValidator(cfg *config.Config) middleware.BasicAuthValidator

func NewOAuthServer

func NewOAuthServer(clientStore *OAuthClientStore) *server.Server

Types

type OAuthClientStore

type OAuthClientStore struct {
	Repo entity.Oauth2ClientRepo
}

func NewOAuthClientStore

func NewOAuthClientStore(repo entity.Oauth2ClientRepo) *OAuthClientStore

func (*OAuthClientStore) GetByID

func (o *OAuthClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error)

func (*OAuthClientStore) UserAuthorizationHandler

func (o *OAuthClientStore) UserAuthorizationHandler(w http.ResponseWriter, req *http.Request) (userID string, err error)

type OAuthHandler

type OAuthHandler struct {
	Server *server.Server
}

func NewOAuthHandler

func NewOAuthHandler(srv *server.Server) *OAuthHandler

func (*OAuthHandler) HandleAuthorizeRequest

func (o *OAuthHandler) HandleAuthorizeRequest(c echo.Context) error

func (*OAuthHandler) HandleTokenRequest

func (o *OAuthHandler) HandleTokenRequest(c echo.Context) error

func (*OAuthHandler) ValidateToken

func (o *OAuthHandler) ValidateToken(next strict.StrictEchoHandlerFunc, operationID string) strict.StrictEchoHandlerFunc

Jump to

Keyboard shortcuts

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