Documentation
¶
Index ¶
Constants ¶
const ( //FiderClaimsOriginUI is assigned to Fider claims when the Auth Token is generated through the UI FiderClaimsOriginUI = "ui" //FiderClaimsOriginAPI is assigned to Fider claims when the Auth Token is generated through the API FiderClaimsOriginAPI = "api" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FiderClaims ¶ added in v0.14.0
type FiderClaims struct {
UserID int `json:"user/id"`
UserName string `json:"user/name"`
UserEmail string `json:"user/email"`
Origin string `json:"origin"`
SecurityStamp string `json:"user/security_stamp,omitempty"`
Metadata
}
FiderClaims represents what goes into JWT tokens
func DecodeFiderClaims ¶
func DecodeFiderClaims(token string) (*FiderClaims, error)
DecodeFiderClaims extract claims from JWT tokens
type Metadata ¶ added in v0.14.0
type Metadata = jwtgo.RegisteredClaims
Metadata is the basic JWT information
type OAuthClaims ¶ added in v0.14.0
type OAuthClaims struct {
OAuthID string `json:"oauth/id"`
OAuthProvider string `json:"oauth/provider"`
OAuthName string `json:"oauth/name"`
OAuthEmail string `json:"oauth/email"`
Metadata
}
OAuthClaims represents what goes into temporary OAuth JWT tokens
func DecodeOAuthClaims ¶
func DecodeOAuthClaims(token string) (*OAuthClaims, error)
DecodeOAuthClaims extract OAuthClaims from given JWT token
type OAuthHandoffClaims ¶ added in v0.37.0
type OAuthHandoffClaims struct {
Provider string `json:"oauthhandoff/provider"`
Origin string `json:"oauthhandoff/origin"`
SessionIDHash string `json:"oauthhandoff/session_id_hash"`
Metadata
}
OAuthHandoffClaims represents the short lived token that hands an OAuth sign in over from the host-wide callback address to the tenant address. It binds the handoff to a single provider, origin and browser session so it cannot be replayed elsewhere.
func DecodeOAuthHandoffClaims ¶ added in v0.37.0
func DecodeOAuthHandoffClaims(token string) (*OAuthHandoffClaims, error)
DecodeOAuthHandoffClaims extract OAuthHandoffClaims from given JWT token
type OAuthStateClaims ¶ added in v0.22.0
type OAuthStateClaims struct {
Redirect string `json:"oauthstate/redirect"`
Identifier string `json:"oauthstate/identifier"`
Code string `json:"oauthstate/code"`
Metadata
}
OAuthStateClaims represents what goes into JWT tokens used for OAuth state parameter
func DecodeOAuthStateClaims ¶ added in v0.22.0
func DecodeOAuthStateClaims(token string) (*OAuthStateClaims, error)
DecodeOAuthStateClaims extract OAuthClaims from given JWT token