Documentation ¶
Index ¶
Constants ¶
View Source
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"` 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.StandardClaims
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
Click to show internal directories.
Click to hide internal directories.