Class AwsAuthenticator

  • All Implemented Interfaces:
    org.restlet.Uniform

    public class AwsAuthenticator
    extends org.restlet.security.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

      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
      • 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​(org.restlet.Context context,
                                boolean optional,
                                java.lang.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​(org.restlet.Context context,
                                boolean optional,
                                java.lang.String realm,
                                org.restlet.security.Verifier verifier)
        Creates a new HttpAwsS3Authenticator instance.
        Parameters:
        context - The context
        optional - Indicates if the authentication success is optional
        realm - The authentication realm
        verifier -
      • AwsAuthenticator

        public AwsAuthenticator​(org.restlet.Context context,
                                java.lang.String realm)
        Creates a new HttpAwsS3Authenticator instance.
        Parameters:
        context - The context
        realm - 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 class org.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 the wrappedVerifier via the setWrappedVerifier(LocalVerifier) method.
        Overrides:
        setVerifier in class org.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