7
0

Merge remote-tracking branch 'origin/master'

This commit is contained in:
liangzy 2020-08-11 18:16:57 +08:00
commit 6bfb0c851c
5 changed files with 40 additions and 3 deletions

View File

@ -29,6 +29,12 @@ func (c *Client) RefreshToken(req *RefreshTokenRequest) (response *RefreshTokenR
return return
} }
func (c *Client) SearchUser(req *SearchUserRequest) (response *SearchUserResponse, err error) {
response = CreateSearchUserResponse()
err = c.DoAction(req, response)
return
}
func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) { func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) {
client = &Client{} client = &Client{}
err = client.InitWithAccessKey(accesskey, secrect, source) err = client.InitWithAccessKey(accesskey, secrect, source)

View File

@ -12,7 +12,6 @@ type CodeAuthRequest struct {
} }
type CodeAuthResponseData struct { type CodeAuthResponseData struct {
*requests.RpcRequest
RefreshToken string `json:"refreshToken"` RefreshToken string `json:"refreshToken"`
RefreshTokenExpires int64 `json:"refreshTokenExpires"` RefreshTokenExpires int64 `json:"refreshTokenExpires"`
Token string `json:"token"` Token string `json:"token"`

View File

@ -12,7 +12,6 @@ type GetUserInfoRequest struct {
} }
type GetUserInfoResponseData struct { type GetUserInfoResponseData struct {
*requests.RpcRequest
User User `json:"user"` User User `json:"user"`
} }

View File

@ -12,7 +12,6 @@ type RefreshTokenRequest struct {
} }
type RefreshTokenResponseData struct { type RefreshTokenResponseData struct {
*requests.RpcRequest
Token string `json:"token"` Token string `json:"token"`
TokenExpires int64 `json:"tokenExpires"` TokenExpires int64 `json:"tokenExpires"`
User User `json:"user"` User User `json:"user"`

View File

@ -0,0 +1,34 @@
package sso
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type SearchUserRequest struct {
*requests.RpcRequest
Uid string `position:"Body" field:"uid" default:"" `
}
type SearchUserResponseData struct {
User User `json:"user"`
}
type SearchUserResponse struct {
*responses.BaseResponse
Data SearchUserResponseData `json:"data"`
}
func CreateSearchUserRequest() (req *SearchUserRequest) {
req = &SearchUserRequest{RpcRequest: &requests.RpcRequest{}}
req.InitWithApiInfo(HOST, VERSION, "/api/user/search")
req.Method = requests.POST
return
}
func CreateSearchUserResponse() (response *SearchUserResponse) {
response = &SearchUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}