authkitgin

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Principal added in v0.72.0

func Principal(c *gin.Context) (authkit.Principal, bool)

func RegisterAPI

func RegisterAPI(r gin.IRouter, svc *authhttp.Service, options ...APIOption)

func RegisterJWKS

func RegisterJWKS(r gin.IRouter, svc *authhttp.Service)

func RegisterOIDC

func RegisterOIDC(r gin.IRouter, svc *authhttp.Service, mountPath string)

func RegisterRoutes

func RegisterRoutes(r gin.IRouter, routes []authhttp.RouteSpec, wrap func(authhttp.RouteSpec, http.Handler) http.Handler)

func RequirePermission added in v0.72.0

func RequirePermission(checker verify.PermissionChecker, perm string, resolve func(*gin.Context) verify.PermissionScope) gin.HandlerFunc

func Use added in v0.72.0

func Use(mw ...func(http.Handler) http.Handler) gin.HandlerFunc

Types

type APIOption

type APIOption func(*APIOptions)

func WithGroups added in v0.72.0

func WithGroups(groups ...authhttp.RouteGroup) APIOption

func WithRouteWrapper

func WithRouteWrapper(wrap func(authhttp.RouteSpec, http.Handler) http.Handler) APIOption

func WithRoutes

func WithRoutes(routes []authhttp.RouteSpec) APIOption

type APIOptions

type APIOptions struct {
	Routes []authhttp.RouteSpec
	Groups []authhttp.RouteGroup
	Wrap   func(authhttp.RouteSpec, http.Handler) http.Handler
	// contains filtered or unexported fields
}

type UserClaimsData added in v0.72.0

type UserClaimsData struct {
	UserID        string
	Email         string
	EmailVerified bool
	Username      string
	SessionID     string
	Entitlements  []string
	AMR           []string
	ACR           string
	AuthTime      time.Time
	MFAEnrolled   bool
}

func UserClaims added in v0.72.0

func UserClaims(c *gin.Context) (UserClaimsData, bool)

Jump to

Keyboard shortcuts

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