Package org.restlet.ext.crypto
Class AwsAuthenticator
- java.lang.Object
-
- org.restlet.Restlet
-
- org.restlet.routing.Filter
-
- org.restlet.security.Authenticator
-
- org.restlet.security.ChallengeAuthenticator
-
- org.restlet.ext.crypto.AwsAuthenticator
-
- All Implemented Interfaces:
Uniform
public class AwsAuthenticator extends ChallengeAuthenticator
Authenticator supporting theChallengeScheme.HTTP_AWS_S3scheme.
-
-
Constructor Summary
Constructors Constructor Description AwsAuthenticator(Context context, boolean optional, java.lang.String realm)Creates a new HttpAwsS3Authenticator instance.AwsAuthenticator(Context context, boolean optional, java.lang.String realm, Verifier verifier)Creates a new HttpAwsS3Authenticator instance.AwsAuthenticator(Context context, java.lang.String realm)Creates a new HttpAwsS3Authenticator instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMaxRequestAge()Returns the maximum age of a request, in milliseconds, before it is considered stale.AwsVerifiergetVerifier()Returns the credentials verifier.LocalVerifiergetWrappedVerifier()Returns the secret verifier that will be wrapped by the real verifier supporting all the HTTP AWS verifications.voidsetMaxRequestAge(long value)Sets the maximum age of a request, in milliseconds, before it is considered stale.voidsetVerifier(Verifier verifier)Sets the internal verifier.voidsetWrappedVerifier(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
-
-
-
-
Constructor Detail
-
AwsAuthenticator
public AwsAuthenticator(Context context, boolean optional, java.lang.String realm)
Creates a new HttpAwsS3Authenticator instance.- Parameters:
context- The contextoptional- Indicates if the authentication success is optionalrealm- The authentication realm
-
AwsAuthenticator
public AwsAuthenticator(Context context, boolean optional, java.lang.String realm, Verifier verifier)
Creates a new HttpAwsS3Authenticator instance.- Parameters:
context- The contextoptional- Indicates if the authentication success is optionalrealm- The authentication realmverifier-
-
AwsAuthenticator
public AwsAuthenticator(Context context, java.lang.String realm)
Creates a new HttpAwsS3Authenticator instance.- Parameters:
context- The contextrealm- The authentication realm
-
-
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.
-
getVerifier
public AwsVerifier getVerifier()
Description copied from class:ChallengeAuthenticatorReturns the credentials verifier.- Overrides:
getVerifierin classChallengeAuthenticator- Returns:
- The credentials verifier.
-
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
-
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.
-
setVerifier
public void setVerifier(Verifier verifier)
Sets the internal verifier. In general you shouldn't replace it but instead set thewrappedVerifiervia thesetWrappedVerifier(LocalVerifier)method.- Overrides:
setVerifierin classChallengeAuthenticator- Parameters:
verifier- The credentials 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
-
-