Package org.apache.cxf.rs.security.oauth.client.OAuthClientUtils

Examples of org.apache.cxf.rs.security.oauth.client.OAuthClientUtils.Token


    if (verifier == null) {
            return redirectToFailureHandler(NO_VERIFIER);
        }
       
    LOG.info("Requesting OAuth server to replace an authorized request token with an access token");
    Token accessToken = manager.getAccessToken(request.getRequestToken(), verifier);
    if (accessToken == null) {
        return redirectToFailureHandler(NO_OAUTH_ACCESS_TOKEN);
    }
   
    LOG.info("Completing the reservation request for a user: " + request.getReserveName());
View Full Code Here


        request.setReserveName(name);
        request.setContactPhone(phone);
        request.setHour(hour);
       
   
    Token requestToken = manager.getRequestToken(callback, request);
    if (requestToken == null) {
            return redirectToFailureHandler(NO_OAUTH_REQUEST_TOKEN);
        }
    request.setRequestToken(requestToken);
 
    String userName = sc.getUserPrincipal().getName();
       
    synchronized (requests) {
      Map<String, ReservationRequest> userRequests = requests.get(userName);
      if (userRequests == null) {
        userRequests = new HashMap<String, ReservationRequest>();
        requests.put(userName, userRequests);
      }
      userRequests.put(requestToken.getToken(), request);
    }
   
    LOG.info("Persisting the reservation details and redirecting"
            + " the current user to OAuth Authorization endpoint");
   
      // Create a request token request and redirect
    return Response.seeOther(manager.getAuthorizationServiceURI(requestToken.getToken())).build();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.rs.security.oauth.client.OAuthClientUtils.Token

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.