Examples of Signer


Examples of com.amazonaws.auth.Signer

     *             If any problems are detected with the specified endpoint.
     * @see AmazonDynamoDB#setRegion(Region)
     */
    public void setEndpoint(String endpoint, String serviceName, String regionId) {
        URI uri = toURI(endpoint);
        Signer signer = computeSignerByServiceRegion(serviceName, regionId,
                regionId, true);
        synchronized(this)  {
            this.signer = signer;
            this.endpoint = uri;
            this.signerRegionOverride = regionId;
View Full Code Here

Examples of com.amazonaws.auth.Signer

    private Signer computeSignerByServiceRegion(
            String serviceName, String regionId,
            String signerRegionOverride,
            boolean isRegionIdAsSignerParam) {
        String signerType = clientConfiguration.getSignerOverride();
        Signer signer = signerType == null
             ? SignerFactory.getSigner(serviceName, regionId)
             : SignerFactory.getSignerByTypeAndService(signerType, serviceName)
             ;
         if (signer instanceof RegionAwareSigner) {
             // Overrides the default region computed
View Full Code Here

Examples of com.amazonaws.auth.Signer

                     + serviceEndpoint + "'.");

        }

        URI uri = toURI(serviceEndpoint);
        Signer signer = computeSignerByServiceRegion(serviceName,
                region.getName(), signerRegionOverride, false);
        synchronized(this)  {
            this.endpoint = uri;
            this.signer = signer;
        }
View Full Code Here

Examples of com.amazonaws.auth.Signer

     * An internal method used to explicitly override the internal signer region
     * computed by the default implementation. This method is not expected to be
     * normally called except for AWS internal development purposes.
     */
    public final void setSignerRegionOverride(String signerRegionOverride) {
        Signer signer = computeSignerByURI(endpoint, signerRegionOverride, true);
        synchronized(this)  {
            this.signer = signer;
            this.signerRegionOverride = signerRegionOverride;
        }
    }
View Full Code Here

Examples of com.amazonaws.auth.Signer

        Map<String, String> originalParameters = new LinkedHashMap<String, String>();
        originalParameters.putAll(request.getParameters());
        Map<String, String> originalHeaders = new HashMap<String, String>();
        originalHeaders.putAll(request.getHeaders());
        final AWSCredentials credentials = executionContext.getCredentials();
        Signer signer = null;

        while (true) {
            ++requestCount;
            awsRequestMetrics.setCounter(Field.RequestCount, requestCount);
            if (requestCount > 1) { // retry
                request.setParameters(originalParameters);
                request.setHeaders(originalHeaders);
            }
            HttpRequestBase httpRequest = null;
            org.apache.http.HttpResponse apacheResponse = null;

            try {
                // Sign the request if a signer was provided
                if (signer == null)
                    signer = executionContext.getSignerByURI(request.getEndpoint());
                if (signer != null && credentials != null) {
                    awsRequestMetrics.startEvent(Field.RequestSigningTime);
                    try {
                        signer.sign(request, credentials);
                    } finally {
                        awsRequestMetrics.endEvent(Field.RequestSigningTime);
                    }
                }
View Full Code Here

Examples of com.erudika.para.rest.Signer

    http.addFilterAfter(facebookFilter, BasicAuthenticationFilter.class);
    http.addFilterAfter(googleFilter, BasicAuthenticationFilter.class);
    http.addFilterAfter(linkedinFilter, BasicAuthenticationFilter.class);

    if (enableRestFilter) {
      RestAuthFilter restFilter = new RestAuthFilter(new Signer());
      http.addFilterAfter(restFilter, RememberMeAuthenticationFilter.class);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.security.authentication.util.Signer

    AuthenticationToken token =
      new AuthenticationToken("u", "p",
        HttpFSKerberosAuthenticationHandlerForTesting.TYPE);
    token.setExpires(System.currentTimeMillis() + 100000000);
    Signer signer = new Signer("secret".getBytes());
    String tokenSigned = signer.sign(token.toString());

    url = new URL(TestJettyHelper.getJettyURL(),
                  "/webhdfs/v1/?op=GETHOMEDIRECTORY");
    conn = (HttpURLConnection) url.openConnection();
    conn.setRequestProperty("Cookie",
View Full Code Here

Examples of org.apache.hadoop.security.authentication.util.Signer

                        "management.operation.return")).elements());
      filter.init(config);

      AuthenticationToken token = new AuthenticationToken("u", "p", DummyAuthenticationHandler.TYPE);
      token.setExpires(System.currentTimeMillis() + TOKEN_VALIDITY_SEC);
      Signer signer = new Signer("secret".getBytes());
      String tokenSigned = signer.sign(token.toString());

      Cookie cookie = new Cookie(AuthenticatedURL.AUTH_COOKIE, tokenSigned);
      HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
      Mockito.when(request.getCookies()).thenReturn(new Cookie[]{cookie});
View Full Code Here

Examples of org.apache.hadoop.security.authentication.util.Signer

      filter.init(config);

      AuthenticationToken token =
          new AuthenticationToken("u", "p", DummyAuthenticationHandler.TYPE);
      token.setExpires(System.currentTimeMillis() - TOKEN_VALIDITY_SEC);
      Signer signer = new Signer("secret".getBytes());
      String tokenSigned = signer.sign(token.toString());

      Cookie cookie = new Cookie(AuthenticatedURL.AUTH_COOKIE, tokenSigned);
      HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
      Mockito.when(request.getCookies()).thenReturn(new Cookie[]{cookie});
View Full Code Here

Examples of org.apache.hadoop.security.authentication.util.Signer

                        "management.operation.return")).elements());
      filter.init(config);

      AuthenticationToken token = new AuthenticationToken("u", "p", "invalidtype");
      token.setExpires(System.currentTimeMillis() + TOKEN_VALIDITY_SEC);
      Signer signer = new Signer("secret".getBytes());
      String tokenSigned = signer.sign(token.toString());

      Cookie cookie = new Cookie(AuthenticatedURL.AUTH_COOKIE, tokenSigned);
      HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
      Mockito.when(request.getCookies()).thenReturn(new Cookie[]{cookie});
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.