-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add renew authentication endpoint #51
Conversation
README.md
Outdated
@@ -209,6 +209,24 @@ try { | |||
} | |||
``` | |||
|
|||
### Renew Authentication | |||
|
|||
Creates a new request to renew the authentication and get fresh new credentials using a valid Refresh Token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I create something "old" ? xD just kidding, but the term "(re)new" is repeated several times, maybe we can remove the first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to specify like in ### Request Token for Audience - /oauth/token
that this is the "new" /oauth/token refresh token?
3b12e18
to
ad2f7c1
Compare
@@ -35,6 +36,7 @@ | |||
private final String clientId; | |||
private final String clientSecret; | |||
private final String baseUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, was used by the AuthorizeUrlBuilder
but now that I see we can replace that parameter with the HttpUrl
. Let me fix it. 👍
@@ -54,6 +56,7 @@ public AuthAPI(String domain, String clientId, String clientSecret) { | |||
if (baseUrl == null) { | |||
throw new IllegalArgumentException("The domain had an invalid format and couldn't be parsed as an URL."); | |||
} | |||
this.httpUrl = HttpUrl.parse(baseUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createBaseUrl
already uses HttpUrl.parse
, so maybe make that return that httpUrl directly?
then baseUrl
(if really required) can be obtained from baseUrl = httpUrl.toString()
263f93f
to
d704ce8
Compare
Looks good |
d704ce8
to
d960564
Compare
d960564
to
9d56b38
Compare
Renew the authentication using a
refresh_token
.Closes #48