Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6bfb0c851c
@ -29,6 +29,12 @@ func (c *Client) RefreshToken(req *RefreshTokenRequest) (response *RefreshTokenR
|
||||
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) {
|
||||
client = &Client{}
|
||||
err = client.InitWithAccessKey(accesskey, secrect, source)
|
||||
|
@ -12,7 +12,6 @@ type CodeAuthRequest struct {
|
||||
}
|
||||
|
||||
type CodeAuthResponseData struct {
|
||||
*requests.RpcRequest
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
RefreshTokenExpires int64 `json:"refreshTokenExpires"`
|
||||
Token string `json:"token"`
|
||||
|
@ -12,7 +12,6 @@ type GetUserInfoRequest struct {
|
||||
}
|
||||
|
||||
type GetUserInfoResponseData struct {
|
||||
*requests.RpcRequest
|
||||
User User `json:"user"`
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ type RefreshTokenRequest struct {
|
||||
}
|
||||
|
||||
type RefreshTokenResponseData struct {
|
||||
*requests.RpcRequest
|
||||
Token string `json:"token"`
|
||||
TokenExpires int64 `json:"tokenExpires"`
|
||||
User User `json:"user"`
|
||||
|
34
services/sso/search_user.go
Normal file
34
services/sso/search_user.go
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user