public class OAuthServiceImpl extends Object implements OAuthService
OAuthService.Builder| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Observable<Token> |
getAccessToken(String code,
List<String> scopes)
Check
OAuthService for more information. |
URL |
getAuthorizationUrl(String state,
List<String> scopes)
Check
OAuthService for more information. |
io.reactivex.Observable<Token> |
refreshAccessToken()
Check
OAuthService for more information. |
public URL getAuthorizationUrl(String state, List<String> scopes) throws MalformedURLException, UnsupportedEncodingException, IllegalArgumentException
OAuthService for more information.getAuthorizationUrl in interface OAuthServicestate - 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.public io.reactivex.Observable<Token> getAccessToken(String code, List<String> scopes)
OAuthService for more information.getAccessToken in interface OAuthServicecode - The code included in the redirect URI.scopes - The scopes defined in the authorization URL.Observable with Token information.public io.reactivex.Observable<Token> refreshAccessToken()
OAuthService for more information.refreshAccessToken in interface OAuthServiceObservable with Token information.Copyright © 2020. All rights reserved.