Package org.scribe.model

Examples of org.scribe.model.Verifier


      System.out.println("Now go and authorize Scribe here:");
      System.out.println(service.getAuthorizationUrl(requestToken));
      System.out.println("And paste the verifier here");
      System.out.print(">>");
      Verifier verifier = new Verifier(in.nextLine());
      System.out.println();

      // Trade the Request Token and Verfier for the Access Token
      System.out.println("Trading the Request Token for an Access Token...");
      Token accessToken = service.getAccessToken(requestToken, verifier);
View Full Code Here


    @RequestMapping("/callback")
    public String callback(@RequestParam String code, WebRequest webRequest) {
        OAuthService oAuthService = (OAuthService) webRequest.getAttribute("oAuthService", WebRequest.SCOPE_SESSION);
        //
        Verifier verifier = new Verifier(code);
        Token accessToken = oAuthService.getAccessToken(EMPTY_TOKEN, verifier);
        webRequest.setAttribute("accessToken", accessToken, WebRequest.SCOPE_SESSION);
        //
        return "redirect:/register";
    }
View Full Code Here

        String authorizationUrl = oAuthService.getAuthorizationUrl(EMPTY_TOKEN);
        System.out.println(authorizationUrl);

        //
        Verifier verifier = new Verifier("22b0abf449005695a5ee0b0343ffd263");
        Token accessToken = oAuthService.getAccessToken(EMPTY_TOKEN, verifier);
        System.out.println("Got access token : " + accessToken);
    }
View Full Code Here

            // We got the verifier;
            // now get the access tokens using the request tokens
            final Token requestToken = new Token(flash.get(TOKEN_KEY), flash.get(SECRET_KEY));
            final String verifier = params.get("oauth_verifier");
            try {
                Token accessToken = oauthService.getAccessToken(requestToken, new Verifier(verifier));

                // Fetch user oAuthAccount
                OAuthAccount oAuthAccount = oauthProvider.getUserAccount(accessToken.getToken(), accessToken.getSecret());
                // Retrieve existing oAuthAccount from profile
                AuthAccount account = AuthAccount.find(provider, oAuthAccount.getOAuthLogin());
View Full Code Here

  private Verifier verifier = null;

  Object onActivate() {
    if (code != null) {
      verifier = new Verifier(code);
      readGoogleKey();
      return Index.class;
    }
    return null;
  }
View Full Code Here

  private Verifier verifier = null;

  Object onActivate() {
    if (code != null) {
      verifier = new Verifier(code);
      readFacebookKey();
      return Index.class;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.scribe.model.Verifier

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.