public interface OAuthService
Modifier and Type | Interface and Description |
---|---|
static class |
OAuthService.Builder
Builder class used to create a new instance of
OAuthService . |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Observable<Token> |
getAccessToken(String code,
List<String> scopes)
Gets an access token using the code authorization grant.
|
URL |
getAuthorizationUrl(String state,
List<String> scopes)
Gets the authorization URL needed to open a web view so the user can login and be
authorised with Bynder.
|
io.reactivex.Observable<Token> |
refreshAccessToken()
Gets a new access token using the refresh token.
|
URL getAuthorizationUrl(String state, List<String> scopes) throws MalformedURLException, UnsupportedEncodingException, IllegalArgumentException
state
- A random string used to maintain state between the request and callback (used
to protect against cross-site request forgery attacks).scopes
- Specifies the scopes for which authorization should be requested.MalformedURLException
- If no protocol is specified, or an unknown protocol is found,
or spec is null while instantiating the URL.UnsupportedEncodingException
- Check Utils.encodeParameterValue(String)
for
more information.IllegalArgumentException
- If state is passed as null or empty.io.reactivex.Observable<Token> getAccessToken(String code, List<String> scopes)
code
- The code included in the redirect URI.scopes
- The scopes defined in the authorization URL.Observable
with Token
information.Copyright © 2023. All rights reserved.