Class HttpAuthenticationManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.controllers.interceptors.auth.impl.HttpAuthenticationManagerImpl
-
- All Implemented Interfaces:
HttpAuthenticationManager
public class HttpAuthenticationManagerImpl extends Object implements HttpAuthenticationManager
- Author:
- Maxim.Manuylov Date: 4/11/12
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTH_MODULE_SESSION_KEY
static String
AUTH_SCHEME_REQUEST_KEY
-
Constructor Summary
Constructors Constructor Description HttpAuthenticationManagerImpl(ExtensionHolder extensionHolder, WebLoginModelEx webLoginModel, AuthModulesProvider authModulesProvider, SecurityContextEx securityContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpAuthenticationResult
processAuthenticationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean canRedirect)
Contract: if canRedirect is false, then <return value>.getRedirectUrl() is null.void
processUnauthenticatedRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String reason, boolean canRedirect)
boolean
shouldNotTryToReauthenticate(javax.servlet.http.HttpServletRequest request)
TW-35022 Skip authentication of request if there's no session or no user in session.
-
-
-
Field Detail
-
AUTH_SCHEME_REQUEST_KEY
@NotNull public static final String AUTH_SCHEME_REQUEST_KEY
- See Also:
- Constant Field Values
-
AUTH_MODULE_SESSION_KEY
@NotNull public static final String AUTH_MODULE_SESSION_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpAuthenticationManagerImpl
public HttpAuthenticationManagerImpl(@NotNull ExtensionHolder extensionHolder, @NotNull WebLoginModelEx webLoginModel, @NotNull AuthModulesProvider authModulesProvider, @NotNull SecurityContextEx securityContext)
-
-
Method Detail
-
processAuthenticationRequest
@NotNull public HttpAuthenticationResult processAuthenticationRequest(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, boolean canRedirect) throws IOException
Description copied from interface:HttpAuthenticationManager
Contract: if canRedirect is false, then <return value>.getRedirectUrl() is null.- Specified by:
processAuthenticationRequest
in interfaceHttpAuthenticationManager
- Throws:
IOException
-
processUnauthenticatedRequest
public void processUnauthenticatedRequest(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @Nullable String reason, boolean canRedirect) throws IOException
- Specified by:
processUnauthenticatedRequest
in interfaceHttpAuthenticationManager
- Throws:
IOException
-
shouldNotTryToReauthenticate
public boolean shouldNotTryToReauthenticate(@NotNull javax.servlet.http.HttpServletRequest request)
Description copied from interface:HttpAuthenticationManager
TW-35022 Skip authentication of request if there's no session or no user in session. Generally we don't reauthenticate ajax and websocket upgrade requests. Some authentication schemes however have specific behaviour and may allow to try to reauthenticate ajax requests.- Specified by:
shouldNotTryToReauthenticate
in interfaceHttpAuthenticationManager
- Parameters:
request
-HttpServletRequest
- Returns:
- true when server should respond with unauthorized without trying to reauthenticate
-
-