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:
org.restlet.Uniform
public class AwsAuthenticator extends org.restlet.security.ChallengeAuthenticator
Authenticator supporting theChallengeScheme.HTTP_AWS_S3
scheme.- Author:
- Jean-Philippe Steinmetz
-
-
Constructor Summary
Constructors Constructor Description AwsAuthenticator(org.restlet.Context context, boolean optional, java.lang.String realm)
Creates a new HttpAwsS3Authenticator instance.AwsAuthenticator(org.restlet.Context context, boolean optional, java.lang.String realm, org.restlet.security.Verifier verifier)
Creates a new HttpAwsS3Authenticator instance.AwsAuthenticator(org.restlet.Context context, java.lang.String realm)
Creates a new HttpAwsS3Authenticator instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getMaxRequestAge()
Returns the maximum age of a request, in milliseconds, before it is considered stale.org.restlet.ext.crypto.internal.AwsVerifier
getVerifier()
org.restlet.security.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(org.restlet.security.Verifier verifier)
Sets the internal verifier.void
setWrappedVerifier(org.restlet.security.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
-
-
-
-
Constructor Detail
-
AwsAuthenticator
public AwsAuthenticator(org.restlet.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(org.restlet.Context context, boolean optional, java.lang.String realm, org.restlet.security.Verifier verifier)
Creates a new HttpAwsS3Authenticator instance.- Parameters:
context
- The contextoptional
- Indicates if the authentication success is optionalrealm
- The authentication realmverifier
-
-
AwsAuthenticator
public AwsAuthenticator(org.restlet.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 org.restlet.ext.crypto.internal.AwsVerifier getVerifier()
- Overrides:
getVerifier
in classorg.restlet.security.ChallengeAuthenticator
-
getWrappedVerifier
public org.restlet.security.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(org.restlet.security.Verifier verifier)
Sets the internal verifier. In general you shouldn't replace it but instead set thewrappedVerifier
via thesetWrappedVerifier(LocalVerifier)
method.- Overrides:
setVerifier
in classorg.restlet.security.ChallengeAuthenticator
-
setWrappedVerifier
public void setWrappedVerifier(org.restlet.security.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
-
-