Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Origin string Username string Name string Email string Roles []string Token *jwt.Token }
User represents a user who has been logged in
func CreateUserFromToken ¶
CreateUserFromToken convers a Jwt into a User struct
func CreateUserFromTokenString ¶
CreateUserFromTokenString parses a Jwt token string and returns a User struct
func (*User) RefreshJwt ¶
func (u *User) RefreshJwt(signingKey *rsa.PrivateKey, expirationDuration time.Duration) (string, error)
RefreshJwt refreshes the token if needed
Click to show internal directories.
Click to hide internal directories.