org.restlet.ext.crypto
Class AwsAuthenticator

java.lang.Object
  extended by org.restlet.Restlet
      extended by org.restlet.routing.Filter
          extended by org.restlet.security.Authenticator
              extended by org.restlet.security.ChallengeAuthenticator
                  extended by org.restlet.ext.crypto.AwsAuthenticator
All Implemented Interfaces:
Uniform

public class AwsAuthenticator
extends ChallengeAuthenticator

Authenticator supporting the ChallengeScheme.HTTP_AWS_S3 scheme.

Author:
Jean-Philippe Steinmetz

Field Summary
 
Fields inherited from class org.restlet.routing.Filter
CONTINUE, SKIP, STOP
 
Constructor Summary
AwsAuthenticator(Context context, boolean optional, String realm)
          Creates a new HttpAwsS3Authenticator instance.
AwsAuthenticator(Context context, boolean optional, String realm, Verifier verifier)
          Creates a new HttpAwsS3Authenticator instance.
AwsAuthenticator(Context context, String realm)
          Creates a new HttpAwsS3Authenticator instance.
 
Method Summary
 long getMaxRequestAge()
          Returns the maximum age of a request, in milliseconds, before it is considered stale.
 org.restlet.ext.crypto.internal.AwsVerifier getVerifier()
           
 LocalVerifier getWrappedVerifier()
          Returns the secret verifier that will be wrapped by the real verifier supporting all the HTTP AWS verifications.
 void setMaxRequestAge(long value)
          Sets the maximum age of a request, in milliseconds, before it is considered stale.
 void setVerifier(Verifier verifier)
          Sets the internal verifier.
 void setWrappedVerifier(LocalVerifier verifier)
          Sets the secret verifier that will be wrapped by the real verifier supporting all the HTTP AWS verifications.
 
Methods inherited from class org.restlet.security.ChallengeAuthenticator
authenticate, challenge, createChallengeRequest, forbid, getRealm, getScheme, isRechallenging, setRealm, setRechallenging
 
Methods inherited from class org.restlet.security.Authenticator
authenticated, beforeHandle, getEnroler, isMultiAuthenticating, isOptional, setEnroler, setMultiAuthenticating, setOptional, unauthenticated
 
Methods inherited from class org.restlet.routing.Filter
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
 
Methods inherited from class org.restlet.Restlet
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwsAuthenticator

public AwsAuthenticator(Context context,
                        String realm)
Creates a new HttpAwsS3Authenticator instance.

Parameters:
context - The context
realm - The authentication realm

AwsAuthenticator

public AwsAuthenticator(Context context,
                        boolean optional,
                        String realm)
Creates a new HttpAwsS3Authenticator instance.

Parameters:
context - The context
optional - Indicates if the authentication success is optional
realm - The authentication realm

AwsAuthenticator

public AwsAuthenticator(Context context,
                        boolean optional,
                        String realm,
                        Verifier verifier)
Creates a new HttpAwsS3Authenticator instance.

Parameters:
context - The context
optional - Indicates if the authentication success is optional
realm - The authentication realm
verifier -
Method Detail

getMaxRequestAge

public long getMaxRequestAge()
Returns the maximum age of a request, in milliseconds, before it is considered stale.

A negative or zero value indicates no age restriction. The default value is 15 minutes.


setMaxRequestAge

public void setMaxRequestAge(long value)
Sets the maximum age of a request, in milliseconds, before it is considered stale.

A negative or zero value indicates no age restriction. The default value is 15 minutes.


getVerifier

public org.restlet.ext.crypto.internal.AwsVerifier getVerifier()
Overrides:
getVerifier in class ChallengeAuthenticator

setVerifier

public void setVerifier(Verifier verifier)
Sets the internal verifier. In general you shouldn't replace it but instead set the wrappedVerifier via the setWrappedVerifier(LocalVerifier) method.

Overrides:
setVerifier in class ChallengeAuthenticator

getWrappedVerifier

public LocalVerifier getWrappedVerifier()
Returns the secret verifier that will be wrapped by the real verifier supporting all the HTTP AWS verifications.

Returns:
the local wrapped verifier

setWrappedVerifier

public void setWrappedVerifier(LocalVerifier verifier)
Sets the secret verifier that will be wrapped by the real verifier supporting all the HTTP AWS verifications.

Parameters:
verifier - The local verifier to wrap


Copyright © 2005-2013 Restlet.