Class HttpAuthenticationResult


  • public class HttpAuthenticationResult
    extends java.lang.Object
    Represents the result of HTTP authentication
    Since:
    8.0
    • Method Detail

      • notApplicable

        @NotNull
        public static HttpAuthenticationResult notApplicable()
        Creates HttpAuthenticationResult which designates that the request was not understood or is not applicable to the HTTP authentication scheme and that response was not affected anyhow. Further request processing should continue.
        Returns:
        see above
      • authenticated

        @NotNull
        public static HttpAuthenticationResult authenticated​(@NotNull
                                                             ServerPrincipal principal,
                                                             boolean rememberMe)
        Creates HttpAuthenticationResult which designates that HTTP authentication scheme determined a user (passed as 'principal') and the request should be processed further with the user logged in.
        Parameters:
        principal - the user determined as valid originator of the request.
        rememberMe - true, if user should be remembered.
        Returns:
        see above
      • unauthenticated

        @NotNull
        public static HttpAuthenticationResult unauthenticated()
        Creates HttpAuthenticationResult which designates that the request was understood and processed by the HTTP authentication scheme by modifying response object (at least setting 401 response code), but user was not (yet) determined or authentication failed. Response should be finished without any extra processing.
        Returns:
        see above
        See Also:
        HttpAuthUtil, UnauthorizedResponseHelper
      • withRedirect

        @NotNull
        public HttpAuthenticationResult withRedirect​(@NotNull
                                                     java.lang.String redirectUrl)
        Specifies the URL to redirect to after authentication. Has no effect for notApplicable() result.
        Parameters:
        redirectUrl - URL for redirect
        Returns:
        this result
      • isRememberMe

        public boolean isRememberMe()
      • getRedirectUrl

        @Nullable
        public java.lang.String getRedirectUrl()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object