Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreTokenFactorySelector ¶
type CoreTokenFactorySelector struct { JSONLoader loaders.JSONLoader DataLoader loaders.RawDataLoader TokenSigner TokenSigner }
func (CoreTokenFactorySelector) Select ¶
func (tfs CoreTokenFactorySelector) Select(tokenType int) TokenFactory
type DefaultClaims ¶
type DefaultClaims struct { jwt.StandardClaims Username string `json:"username"` Role string `json:"role"` }
type DefaultTokenFactory ¶
type DefaultTokenFactory struct { DataLoader loaders.RawDataLoader TokenSigner TokenSigner }
func (DefaultTokenFactory) CreateToken ¶
type FirebaseClaims ¶
type FirebaseServiceJSON ¶
type FirebaseTokenFactory ¶
type FirebaseTokenFactory struct { JSONLoader loaders.JSONLoader TokenSigner TokenSigner }
func (FirebaseTokenFactory) CreateToken ¶
type JWTTokenSigner ¶
type JWTTokenSigner struct{}
type TokenFactory ¶
type TokenFactory interface { // CreateToken creates a signed JWT using the key loaded from the key uri. // Should also include the username and role in its claims and optionally the client uid. // Returns the token string any errors. CreateToken(keyUri string, clientUID uuid.UUID, username string, role string) (string, error) }
type TokenFactorySelector ¶
type TokenFactorySelector interface { // Select selects the TokenFactory based on the provided tokenType. // Returns the TokenFactory, or nil if the type is unknown. Select(tokenType int) TokenFactory }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.