Enum AuthenticationMode

    • Enum Constant Detail

      • PRO_ACTIVE

        public static final AuthenticationMode PRO_ACTIVE
        Where the authentication mode is set to pro-active each request on arrival will be passed to the defined authentication mechanisms to eagerly perform authentication if there is sufficient information available in order to do so. A pro-active authentication could be possible for a number of reasons such as already having a SSL connection established, an identity being cached against the current session or even a browser sending in authentication headers. Running in pro-active mode the sending of the challenge to the client is still driven by the constraints defined so this is not the same as mandating security for all paths. For some mechanisms such as Digest this is a recommended mode as without it there is a risk that clients are sending in headers with unique nonce counts that go unverified risking that a malicious client could make use of them. This is also useful for applications that wish to make use of the current authenticated user if one exists without mandating that authentication occurs.
      • CONSTRAINT_DRIVEN

        public static final AuthenticationMode CONSTRAINT_DRIVEN
        When running in constraint driven mode the authentication mechanisms are only executed where the constraint that mandates authentication is triggered, for all other requests no authentication occurs unless requested by the internal APIs which may be exposed using the Servlet APIs.
    • Method Detail

      • values

        public static AuthenticationMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AuthenticationMode c : AuthenticationMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AuthenticationMode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null