oauthmiddleware

package
v1.35.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessTokenOnly

func AccessTokenOnly(c *gin.Context)

func ApiKeyOnly

func ApiKeyOnly(c *gin.Context)

Site Tokens require no user id and a organization name and app name with Claims

func ApiKeyOrAccessTokenOnly

func ApiKeyOrAccessTokenOnly(c *gin.Context)

Site Tokens require no user id and a organization name and app name with Claims

func CustomerTokenOnly

func CustomerTokenOnly(c *gin.Context)

Customer Tokens require a user id and a organization name and app name with AccessClaims

func DecodeToken

func DecodeToken(c *gin.Context, tokString string, validationFn func(oauthtoken.Claims) error) (*organization.Organization, *app.App, *oauthtoken.Claims, bool)

func GetAccessToken

func GetAccessToken(c *gin.Context) string

func GetClaims

func GetClaims(c *gin.Context) *oauthtoken.Claims

func GetPermissions

func GetPermissions(c *gin.Context) bit.Field

func GetStore

func GetStore(c *gin.Context) *app.App

func GetUser

func GetUser(c *gin.Context) *user.User

func IsAccessIssuerRevoked

func IsAccessIssuerRevoked(c *gin.Context, claims *oauthtoken.Claims) bool

func IsCustomerIssuerRevoked

func IsCustomerIssuerRevoked(c *gin.Context, org *organization.Organization, claims *oauthtoken.Claims) bool

func ParseToken

func ParseToken(c *gin.Context)

func TokenPermits

func TokenPermits(masks ...bit.Mask) gin.HandlerFunc

Permissions required to access route

func TokenRequired

func TokenRequired(masks ...bit.Mask) gin.HandlerFunc

Parses token, default permissions check

Types

This section is empty.

Jump to

Keyboard shortcuts

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