Documentation ¶
Index ¶
Constants ¶
View Source
const ( //TemplatesClaimsOriginUI is assigned to Templates claims when the Auth Token is generated through the UI TemplatesClaimsOriginUI = "ui" //TemplatesClaimsOriginAPI is assigned to Templates claims when the Auth Token is generated through the API TemplatesClaimsOriginAPI = "api" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OAuthClaims ¶
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 TemplatesClaims ¶
type TemplatesClaims struct { UserID int `json:"user/id"` UserName string `json:"user/name"` UserEmail string `json:"user/email"` Origin string `json:"origin"` Metadata }
TemplatesClaims represents what goes into JWT tokens
func DecodeTemplatesClaims ¶
func DecodeTemplatesClaims(token string) (*TemplatesClaims, error)
DecodeTemplatesClaims extract claims from JWT tokens
Click to show internal directories.
Click to hide internal directories.