mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 21:27:42 +00:00
print refresh token response
This commit is contained in:
parent
e46082949a
commit
fb6f7751ae
1 changed files with 2 additions and 5 deletions
|
@ -13,10 +13,6 @@ import (
|
|||
"github.com/valyala/fastjson"
|
||||
)
|
||||
|
||||
const (
|
||||
tokenURL = "https://www.reddit.com/api/v1/access_token"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
id string
|
||||
secret string
|
||||
|
@ -155,7 +151,7 @@ func (rac *AuthenticatedClient) RefreshTokens() (*RefreshTokenResponse, error) {
|
|||
req := NewRequest(
|
||||
WithTags([]string{"url:/api/v1/access_token"}),
|
||||
WithMethod("POST"),
|
||||
WithURL(tokenURL),
|
||||
WithURL("https://www.reddit.com/api/v1/access_token"),
|
||||
WithBody("grant_type", "refresh_token"),
|
||||
WithBody("refresh_token", rac.refreshToken),
|
||||
WithBasicAuth(rac.id, rac.secret),
|
||||
|
@ -165,6 +161,7 @@ func (rac *AuthenticatedClient) RefreshTokens() (*RefreshTokenResponse, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println(rtr)
|
||||
return rtr.(*RefreshTokenResponse), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue