Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginInput ¶
type LoginOutput ¶
type LoginOutput struct {
TokenType string `json:"tokenType" dc:"Token type, default is Bearer"`
Token string `json:"token" dc:"Access token"`
ExpireIn int64 `json:"expireIn" dc:"Access token lifetime in seconds"`
ExpiresAt string `json:"expiresAt" dc:"Access token expiry in RFC3339"`
RefreshToken string `json:"refreshToken" dc:"One-time refresh token"`
RefreshExpiresAt string `json:"refreshExpiresAt" dc:"Refresh expiry in RFC3339"`
Refreshable bool `json:"refreshable" dc:"Whether one refresh remains"`
Username string `json:"username" dc:"username"`
}
type LoginReq ¶
type LoginReq struct {
g.Meta `path:"/login" method:"post" tags:"auth" summary:"login"`
LoginInput
}
type LoginRes ¶
type LoginRes = LoginOutput
type LogoutInput ¶ added in v1.2.0
type LogoutInput struct {
RefreshToken string `json:"refreshToken"`
}
type LogoutReq ¶
type LogoutReq struct {
g.Meta `path:"/logout" method:"post" tags:"auth" summary:"logout"`
LogoutInput
}
type RefreshInput ¶ added in v1.2.0
type RefreshInput struct {
RefreshToken string `json:"refreshToken" v:"required"`
}
type RefreshOutput ¶ added in v1.2.0
type RefreshReq ¶ added in v1.2.0
type RefreshReq struct {
g.Meta `path:"/refresh" method:"post" tags:"auth" summary:"refresh once"`
RefreshInput
}
type RefreshRes ¶ added in v1.2.0
type RefreshRes = RefreshOutput
Click to show internal directories.
Click to hide internal directories.