Package ca.coolman.components

Examples of ca.coolman.components.ObservableWebBrowser


    // Retrieve (and wait) for the request token
    NetworkManager.getInstance().addToQueueAndWait(rtr);
    RequestToken requestToken = rtr.getToken();
   
    // Use the request token to retrieve an access token for the authorizing user.
    final ObservableWebBrowser wb = new ObservableWebBrowser();
    AccessTokenRequest atr = new AccessTokenRequest(serviceProvider, signer, requestToken);
    atr.addReceiveTokenListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        Log.p("onAccessToken()", Log.DEBUG);
        AccessToken at = (AccessToken)evt.getSource();
        onReceiveAccessToken(at);
        onSaveAccessToken(at);
        onAuthenticated();
        onDisposeLogin(backForm, wb);
      }
    });
    atr.addDeniedListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        onDisposeLogin(backForm, wb);
      }
    });

    wb.addStartListener(atr);
    String url = serviceProvider.getAuthenticateUrl(requestToken);
    wb.setURL(url);
    onDisplayLogin(backForm, wb);
  }
View Full Code Here

TOP

Related Classes of ca.coolman.components.ObservableWebBrowser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.