Documentation
¶
Index ¶
Constants ¶
View Source
const TenantIDContextKey = "auth.tenant_id"
Variables ¶
This section is empty.
Functions ¶
func GenerateTenantToken ¶
func Middleware ¶
func Middleware(a Authenticator) gin.HandlerFunc
Types ¶
type Authenticator ¶
type JWTAuthenticator ¶
type JWTAuthenticator struct {
// contains filtered or unexported fields
}
func NewJWTAuthenticator ¶
func NewJWTAuthenticator(secret, issuer string) (*JWTAuthenticator, error)
func (*JWTAuthenticator) Authenticate ¶
type TenantClaims ¶
type TenantClaims struct {
TenantID string `json:"tenant_id"`
jwt.RegisteredClaims
}
Click to show internal directories.
Click to hide internal directories.