Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NonceResponse ¶
type NonceResponse struct {
Nonce string `json:"nonce"`
}
NonceResponse is the result for a nonce GET request
type RefreshBody ¶
type RefreshBody struct {
RefreshToken string `json:"refresh_token"`
}
RefreshBody is the body for the token refresh request
type RefreshResponse ¶
type RefreshResponse struct {
AccessToken string `json:"access_token"`
}
RefreshResponse is the response for a token refreh request
type RefreshToken ¶
type RefreshToken struct { gorm.Model Token string `json:"refresh_token" gorm:"uniqueIndex"` Username string `gorm:"not null"` }
RefreshToken is the model for the refresh_token generate and stored into the DB It is used to refresh the JWTs. The JWTs have a validity of 1h
type SignInBody ¶
SignInBody contains the body for the sign-up request
type SignInResponse ¶
type SignInResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
SignInResponse contains the response for a sign-in request
type SignUpBody ¶
SignUpBody contains the body for the sign-up request
Click to show internal directories.
Click to hide internal directories.