7
0
gaore-common-sdk-go/services/sso/refresh_token.go
2020-08-07 16:22:28 +08:00

39 lines
1009 B
Go

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
OauthCode string `position:"Body" field:"oauthCode" default:"" `
Ident string `position:"Body" field:"ident" default:"" `
}
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
}