Examples of OAuthArguments


Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

        + "}}");
    HttpRequest httpRequest = new HttpRequest(Uri.parse("http://www.example.org/somecontent"));
    httpRequest.setMethod("GET");
    httpRequest.setAuthType(AuthType.SIGNED);
    httpRequest.setOAuthArguments(
        new OAuthArguments(AuthType.SIGNED, ImmutableMap.<String, String>of()));
    expect(pipeline.execute(eqRequest(httpRequest))).andReturn(builder.create()).anyTimes();
    replay();
    RpcHandler operation = registry.getRpcHandler(request);

    HttpRequestHandler.HttpApiResponse httpApiResponse =
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

        + "}}");
    HttpRequest httpRequest = new HttpRequest(Uri.parse("http://www.example.org/somecontent"));
    httpRequest.setMethod("POST");
    httpRequest.setAuthType(AuthType.SIGNED);
    httpRequest.setOAuthArguments(
        new OAuthArguments(AuthType.SIGNED, ImmutableMap.<String, String>of()));
    httpRequest.setPostBody("POSTBODY".getBytes());
    expect(pipeline.execute(eqRequest(httpRequest))).andReturn(builder.create()).anyTimes();
    replay();
    RpcHandler operation = registry.getRpcHandler(request);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

        + "}}");
    HttpRequest httpRequest = new HttpRequest(Uri.parse("http://www.example.org/somecontent"));
    httpRequest.setMethod("POST");
    httpRequest.setAuthType(AuthType.OAUTH);
    httpRequest.setOAuthArguments(
        new OAuthArguments(AuthType.OAUTH, ImmutableMap.<String, String>of()));
    httpRequest.setPostBody("POSTBODY".getBytes());
    expect(pipeline.execute(eqRequest(httpRequest))).andReturn(builder.create()).anyTimes();
    replay();
    RpcHandler operation = registry.getRpcHandler(request);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

        + "authz: 'oauth' }"
        + "}}");
    HttpRequest httpRequest = new HttpRequest(Uri.parse("http://www.example.org/somecontent"));
    httpRequest.setMethod("POST");
    httpRequest.setAuthType(AuthType.OAUTH);
    OAuthArguments oauthArgs =
        new OAuthArguments(AuthType.OAUTH, ImmutableMap.<String, String>of());
    oauthArgs.setSignOwner(false);
    oauthArgs.setServiceName("oauthService");
    httpRequest.setOAuthArguments(oauthArgs);
    httpRequest.setPostBody("POSTBODY".getBytes());

    Capture<HttpRequest> requestCapture = new Capture<HttpRequest>();
    expect(pipeline.execute(capture(requestCapture))).andReturn(builder.create());
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

    SecurityToken securityToken = new BasicSecurityToken(ownerId, "", "", "",
        APP_URI.toString(), MODULE_ID, CONTAINER_NAME, null, null);

    HttpRequest request = new HttpRequest(DEFAULT_URI)
        .setAuthType(AuthType.SIGNED)
        .setOAuthArguments(new OAuthArguments(authInfo))
        .setSecurityToken(securityToken);

    CacheKeyBuilder key = new CacheKeyBuilder()
        .setLegacyParam(0, DEFAULT_URI)
        .setLegacyParam(1, AuthType.SIGNED)
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

    SecurityToken securityToken = new BasicSecurityToken(
        "", viewerId, "", "", APP_URI.toString(), MODULE_ID, CONTAINER_NAME, null, null);

    HttpRequest request = new HttpRequest(DEFAULT_URI)
        .setAuthType(AuthType.SIGNED)
        .setOAuthArguments(new OAuthArguments(authInfo))
        .setSecurityToken(securityToken);

    CacheKeyBuilder key = new CacheKeyBuilder()
        .setLegacyParam(0, DEFAULT_URI)
        .setLegacyParam(1, AuthType.SIGNED)
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

    SecurityToken securityToken = new BasicSecurityToken(
        userId, userId, "", "", APP_URI.toString(), MODULE_ID, CONTAINER_NAME, null, null);

    HttpRequest request = new HttpRequest(DEFAULT_URI)
        .setAuthType(AuthType.SIGNED)
        .setOAuthArguments(new OAuthArguments(authInfo))
        .setSecurityToken(securityToken);

    CacheKeyBuilder key = new CacheKeyBuilder()
        .setLegacyParam(0, DEFAULT_URI)
        .setLegacyParam(1, AuthType.SIGNED)
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

        false /* isSignViewer */,
        ImmutableMap.<String, String>of());
    replay(authInfo);
    HttpRequest request = new HttpRequest(DEFAULT_URI)
        .setAuthType(AuthType.SIGNED)
        .setOAuthArguments(new OAuthArguments(authInfo));
    cache.createKey(request);
  }
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

          req.setOAuth2Arguments(oauth2Args);
        } else {
          req.setSecurityToken(requestItem.getToken());

          Map<String, String> authSettings = getAuthSettings(requestItem);
          OAuthArguments oauthArgs = new OAuthArguments(req.getAuthType(), authSettings);
          oauthArgs.setSignOwner(httpApiRequest.signOwner);
          oauthArgs.setSignViewer(httpApiRequest.signViewer);

          req.setOAuthArguments(oauthArgs);
        }
      }
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth.OAuthArguments

      if (auth == AuthType.OAUTH2) {
        req.setSecurityToken(extractAndValidateToken(request));
        req.setOAuth2Arguments(new OAuth2Arguments(request));
      } else {
        req.setSecurityToken(extractAndValidateToken(request));
        req.setOAuthArguments(new OAuthArguments(auth, request));
      }
    }

    ServletUtil.setXForwardedForHeader(request, req);
    return req;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.