iamgin

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package iamgin exposes the IAM SDK as gin.HandlerFunc middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(sdk *iam.SDK, opts ...iam.AuthOption) gin.HandlerFunc

Authenticate validates the bearer token, resolves permissions, and stashes the *authz.User in the gin context chain.

func RequireAllPerms

func RequireAllPerms(perms []authz.PermissionKey) gin.HandlerFunc

RequireAllPerms accepts the request only if the caller holds every perm.

func RequireAnyPerm

func RequireAnyPerm(perms []authz.PermissionKey) gin.HandlerFunc

RequireAnyPerm accepts the request if the caller holds any of perms.

func RequireNoImpersonation

func RequireNoImpersonation() gin.HandlerFunc

RequireNoImpersonation blocks requests performed under an admin impersonation token.

func RequirePerm

func RequirePerm(perm authz.PermissionKey) gin.HandlerFunc

RequirePerm rejects the request with 403 if the caller lacks perm.

func RequireStepUp

func RequireStepUp(acr string) gin.HandlerFunc

RequireStepUp requires the JWT's acr claim to match acr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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