haiwai-common-sdk-go/services/sso/refresh_token.go

38 lines
998 B
Go
Raw Normal View History

2023-02-21 20:46:05 +08:00
package sso
import (
2023-02-21 20:58:53 +08:00
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk/responses"
2023-02-21 20:46:05 +08:00
)
type RefreshTokenRequest struct {
*requests.RpcRequest
RefreshToken string `position:"Body" field:"refreshToken" default:"" `
Ident string `position:"Body" field:"ident" default:"" `
}
type RefreshTokenResponseData struct {
Token string `json:"token"`
TokenExpires int64 `json:"tokenExpires"`
User User `json:"user"`
}
type RefreshTokenResponse struct {
*responses.BaseResponse
Data GetUserInfoResponseData `json:"data"`
}
func CreateRefreshTokenRequest() (req *RefreshTokenRequest) {
req = &RefreshTokenRequest{RpcRequest: &requests.RpcRequest{}}
req.InitWithApiInfo(HOST, VERSION, "/api/userSess/refreshToken")
req.Method = requests.POST
return
}
func CreateRefreshTokenResponse() (response *RefreshTokenResponse) {
response = &RefreshTokenResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}