7
0
gaore-common-sdk-go/services/sso/refresh_token.go

39 lines
1018 B
Go
Raw Normal View History

2020-08-07 16:22:28 +08:00
package sso
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type RefreshTokenRequest struct {
*requests.RpcRequest
2020-08-07 17:34:43 +08:00
RefreshToken string `position:"Body" field:"refreshToken" default:"" `
Ident string `position:"Body" field:"ident" default:"" `
2020-08-07 16:22:28 +08:00
}
type RefreshTokenResponseData struct {
*requests.RpcRequest
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
}