Package com.google.apphosting.api.UserServicePb

Examples of com.google.apphosting.api.UserServicePb.GetOAuthUserRequest


      Arrays.sort(scopesCopy);
      scopesKey = Arrays.toString(scopesCopy);
    }
    String lastScopesKey = (String) environment.getAttributes().get(GET_OAUTH_USER_SCOPE_KEY);
    if (response == null || !Objects.equals(lastScopesKey, scopesKey)) {
      GetOAuthUserRequest request = new GetOAuthUserRequest();
      if (scopes != null) {
        for (String scope : scopes) {
          request.addScopes(scope);
        }
      }
      Boolean requestWriterPermission = (Boolean) environment.getAttributes().get(
          REQUEST_WRITER_PERMISSION_KEY);
      if (requestWriterPermission != null && requestWriterPermission) {
        request.setRequestWriterPermission(true);
      }
      byte[] responseBytes = makeSyncCall(GET_OAUTH_USER_METHOD, request);
      response = new GetOAuthUserResponse();
      response.mergeFrom(responseBytes);
      environment.getAttributes().put(GET_OAUTH_USER_RESPONSE_KEY, response);
View Full Code Here


    ApiProxy.Environment environment = ApiProxy.getCurrentEnvironment();
    GetOAuthUserResponse response = (GetOAuthUserResponse)
        environment.getAttributes().get(GET_OAUTH_USER_RESPONSE_KEY);
    String lastScope = (String) environment.getAttributes().get(GET_OAUTH_USER_SCOPE_KEY);
    if (response == null || !Objects.equal(lastScope, scope)) {
      GetOAuthUserRequest request = new GetOAuthUserRequest();
      if (!scope.isEmpty()) {
        request.setScope(scope);
      }
      byte[] responseBytes = makeSyncCall(GET_OAUTH_USER_METHOD, request);
      response = new GetOAuthUserResponse();
      response.mergeFrom(responseBytes);
      environment.getAttributes().put(GET_OAUTH_USER_RESPONSE_KEY, response);
View Full Code Here

TOP

Related Classes of com.google.apphosting.api.UserServicePb.GetOAuthUserRequest

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.