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

37 lines
883 B
Go

package sso
import "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
const (
HOST = "sso"
VERSION = "2020-08-07"
)
type Client struct {
sdk.Client
}
func (c *Client) CodeAuth(req *CodeAuthRequest) (response *CodeAuthResponse, err error) {
response = CreateCodeAuthResponse()
err = c.DoAction(req, response)
return
}
func (c *Client) GetUserInfo(req *GetUserInfoRequest) (response *GetUserInfoResponse, err error) {
response = CreateGetUserInfoResponse()
err = c.DoAction(req, response)
return
}
func (c *Client) RefreshToken(req *RefreshTokenRequest) (response *RefreshTokenResponse, err error) {
response = CreateRefreshTokenResponse()
err = c.DoAction(req, response)
return
}
func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) {
client = &Client{}
err = client.InitWithAccessKey(accesskey, secrect, source)
return
}