Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthCodeURL ¶
func GetAuthCodeURL(req *AuthCodeReq) string
Types ¶
type AuthCodeReq ¶
type GetTokenReq ¶
type GetTokenReq struct {
ClientId string `query:"client_id" default:"$CLIENT_ID"`
ClientSecret string `query:"client_secret" default:"$CLIENT_SECRET"`
Code string `query:"code"`
GrantType string `query:"grant_type" default:"authorization_code"`
RedirectUri string `query:"redirect_uri" default:"$REDIRECT_URI"`
}
type GetTokenRes ¶
type GetTokenRes struct {
AccessToken string `json:"access_token"`
ExpiresIn int64 `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
SessionKey string `json:"session_key"`
SessionSecret string `json:"session_secret"`
}
func GetToken ¶
func GetToken(req *GetTokenReq) (*GetTokenRes, error)
func RefreshToken ¶
func RefreshToken(req *RefreshTokenReq) (*GetTokenRes, error)
type RefreshTokenReq ¶
Click to show internal directories.
Click to hide internal directories.