middleware

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const NO_AUTH_ACCOUNT = "_no_auth"

Variables

This section is empty.

Functions

func AuthRequired

func AuthRequired() gin.HandlerFunc

func AuthUserHandler

func AuthUserHandler(auService happydns.AuthUserUsecase) gin.HandlerFunc

func AuthUserHandlerBase

func AuthUserHandlerBase(auService happydns.AuthUserUsecase, c *gin.Context) (*happydns.UserAuth, error)

func DomainHandler

func DomainHandler(domainService happydns.DomainUsecase, allowFQDN bool) gin.HandlerFunc

func ErrorResponse

func ErrorResponse(c *gin.Context, defaultStatus int, err error)

func JwtAuthMiddleware

func JwtAuthMiddleware(authService happydns.AuthenticationUsecase, signingMethod string, secretKey []byte) gin.HandlerFunc

func MyUser

func MyUser(c *gin.Context) (user *happydns.User)

func NoAuthMiddleware

func NoAuthMiddleware(authService happydns.AuthenticationUsecase) gin.HandlerFunc

func ParseZoneId

func ParseZoneId(c *gin.Context, paramName string) (happydns.Identifier, error)

func ProviderHandler

func ProviderHandler(providerService happydns.ProviderUsecase) gin.HandlerFunc

func ProviderMetaHandler

func ProviderMetaHandler(providerService happydns.ProviderUsecase) gin.HandlerFunc

func ProviderSpecsHandler

func ProviderSpecsHandler(c *gin.Context)

func SameUserHandler

func SameUserHandler(c *gin.Context)

func ServiceIdHandler

func ServiceIdHandler(suService happydns.ServiceUsecase) gin.HandlerFunc

func ServiceSpecsHandler

func ServiceSpecsHandler(c *gin.Context)

func SessionLoginOK

func SessionLoginOK(c *gin.Context, user happydns.UserInfo) error

func SessionMiddleware

func SessionMiddleware(authService happydns.AuthenticationUsecase) gin.HandlerFunc

func SubdomainHandler

func SubdomainHandler(c *gin.Context)

func UserHandler

func UserHandler(userService happydns.UserUsecase) gin.HandlerFunc

func UserHandlerBase

func UserHandlerBase(userService happydns.UserUsecase, c *gin.Context) (*happydns.User, error)

func ZoneHandler

func ZoneHandler(zuService happydns.ZoneUsecase) gin.HandlerFunc

Types

type UserClaims

type UserClaims struct {
	Profile happydns.UserProfile `json:"profile"`
	jwt.RegisteredClaims
}

UserClaims is an object that permit user creation after authentication.

Source Files

  • auth_middleware.go
  • auth_user.go
  • domain.go
  • errors.go
  • jwt_auth_middleware.go
  • no_auth_middleware.go
  • provider.go
  • provider_specs.go
  • service.go
  • service_specs.go
  • session_middleware.go
  • user.go
  • zone.go

Jump to

Keyboard shortcuts

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