auth

package
v1.6.6-beta2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 18 Imported by: 2

Documentation

Overview

Package auth handles sever-side and client-side authentication

Index

Constants

View Source
const (
	ISADMIN = iota
	ISLOCAL
	ISKNOWN
	ISUNITED
	ISREGISTERED
)

Variables

This section is empty.

Functions

func NewService

func NewService(
	rdb *redis.Client,
	config core.Config,
	entity core.EntityService,
	domain core.DomainService,
	key core.KeyService,
	policy core.PolicyService,
) core.AuthService

NewService creates a new auth service

func Recaptcha

func Recaptcha(validator *recaptcha.ReCAPTCHA) echo.MiddlewareFunc

func ReceiveGatewayAuthPropagation

func ReceiveGatewayAuthPropagation(next echo.HandlerFunc) echo.HandlerFunc

func Restrict

func Restrict(principal Principal) echo.MiddlewareFunc

Types

type Handler

type Handler interface {
	GetPassport(c echo.Context) error
}

Handler is the interface for handling HTTP requests

func NewHandler

func NewHandler(service core.AuthService) Handler

NewHandler creates a new handler

type Principal

type Principal int

Jump to

Keyboard shortcuts

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