Documentation ¶
Index ¶
- Variables
- func GenerateToken(identityID string, identityUsername string, privateKey *rsa.PrivateKey) (string, error)
- func GenerateTokenWithClaims(claims map[string]interface{}) (string, error)
- func NewManager() token.Manager
- func PrivateKey() *rsa.PrivateKey
- func UpdateToken(tokenString string, claims map[string]interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TokenManager token.Manager
)
Functions ¶
func GenerateToken ¶
func GenerateToken(identityID string, identityUsername string, privateKey *rsa.PrivateKey) (string, error)
GenerateToken generates a JWT token and signs it using the given private key
func GenerateTokenWithClaims ¶
GenerateTokenWithClaims generates a JWT token with additional claims
func NewManager ¶
NewManager returns a new token Manager for handling tokens
func PrivateKey ¶
func PrivateKey() *rsa.PrivateKey
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.