net.netheos.pcsapi.oauth
Class OAuth2Bootstrapper

java.lang.Object
  extended by net.netheos.pcsapi.oauth.OAuth2Bootstrapper

public class OAuth2Bootstrapper
extends Object

Utility class to retrieve initial token and populate a UserCredentialsRepository.


Constructor Summary
OAuth2Bootstrapper(IStorageProvider storageProvider)
           
 
Method Summary
 URI getAuthorizeBrowserUrl()
          Builds the authorize URI that must be loaded in a browser to allow the application to use the API
 void getUserCredentials(String codeOrUrl)
          Gets users Credentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuth2Bootstrapper

public OAuth2Bootstrapper(IStorageProvider storageProvider)
Method Detail

getAuthorizeBrowserUrl

public URI getAuthorizeBrowserUrl()
Builds the authorize URI that must be loaded in a browser to allow the application to use the API

Returns:
The authorize URI

getUserCredentials

public void getUserCredentials(String codeOrUrl)
                        throws IOException
Gets users Credentials

Parameters:
codeOrUrl - code or redirect URL provided by the browser
Throws:
IOException


Copyright © 2014. All Rights Reserved.