21 lines
384 B
Go
21 lines
384 B
Go
package auth
|
|
|
|
type Client struct {
|
|
CorpId string
|
|
CorpSecret string
|
|
}
|
|
|
|
type tokenResponse struct {
|
|
ErrCode int `json:"errcode"`
|
|
ErrMsg string `json:"errmsg"`
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn int `json:"expires_in"`
|
|
}
|
|
|
|
func NewClient(corpId, corpSecret string) *Client {
|
|
return &Client{
|
|
CorpId: corpId,
|
|
CorpSecret: corpSecret,
|
|
}
|
|
}
|