Class HttpAuthenticationResult
- java.lang.Object
-
- jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationResult
-
public class HttpAuthenticationResult extends java.lang.Object
Represents the result of HTTP authentication- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpAuthenticationResult.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpAuthenticationResult
authenticated(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.ServerPrincipal
getPrincipal()
java.lang.String
getRedirectUrl()
HttpAuthenticationResult.Type
getType()
boolean
isRememberMe()
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.java.lang.String
toString()
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.HttpAuthenticationResult
withRedirect(java.lang.String redirectUrl)
Specifies the URL to redirect to after authentication.
-
-
-
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 fornotApplicable()
result.- Parameters:
redirectUrl
- URL for redirect- Returns:
- this result
-
getType
@NotNull public HttpAuthenticationResult.Type getType()
-
getPrincipal
@NotNull public ServerPrincipal getPrincipal()
-
isRememberMe
public boolean isRememberMe()
-
getRedirectUrl
@Nullable public java.lang.String getRedirectUrl()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-