public void attemptAuthorization(OAuthAuthenticationHandler handler) throws IOException, OauthAuthenticationException {
final BrowserAuthorityBridge browser = new BrowserAuthorityBridge(clientId, scopes);
if(username != null && password != null){
browser.usingBasicAuth(username, password);
}
browser.showBrowser();
final String requestUuid = browser.getRequestUuid();
final ParseTokenResourceService tokenService = new ParseTokenResourceService(parse);
final ParseTokenStatePollingTask pollingTask = tokenService.createTokenPollingTask(requestUuid, maxAttempts, handler);