Class ForbiddingDomainsAuthenticationScheme
- java.lang.Object
-
- jetbrains.buildServer.serverSide.auth.AuthModuleTypeAdapter
-
- jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationSchemeAdapter
-
- jetbrains.buildServer.controllers.interceptors.auth.impl.ForbiddingDomainsAuthenticationScheme
-
- All Implemented Interfaces:
HttpAuthenticationScheme
,AuthModuleType
,SystemAuthModuleType
public class ForbiddingDomainsAuthenticationScheme extends HttpAuthenticationSchemeAdapter implements SystemAuthModuleType
If the request comes from the forbidden origin {@see jetbrains.buildServer.web.AdditionalDomain#isLoginForbidden}, stops the authentication right away and returns the unauthenticated result thus preventing other authentication schemes from being applied. This implies that the logins from forbidden domains won't be allowed at all.
Note that the order of this scheme is crucial. It should be strictly defined after thePresignedTokenHttpAuthenticationScheme
but before all the other authentication schemes
-
-
Constructor Summary
Constructors Constructor Description ForbiddingDomainsAuthenticationScheme(DomainIsolationProtection domainIsolationProtection, WebLoginModel webLoginModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doGetName()
HttpAuthenticationResult
processAuthenticationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,String> properties)
Processes authentication request.
If the request does not correspond to this scheme, method must return HttpAuthenticationResult.notApplicable().
If response object is changed inside the method, method must return HttpAuthenticationResult.unauthenticated().-
Methods inherited from class jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationSchemeAdapter
getName, validate
-
Methods inherited from class jetbrains.buildServer.serverSide.auth.AuthModuleTypeAdapter
describeProperties, getDefaultProperties, getDescription, getDisplayName, getEditPropertiesJspFilePath, isMultipleInstancesAllowed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.AuthModuleType
describeProperties, getDefaultProperties, getDescription, getDisplayName, getEditPropertiesJspFilePath, getName, isMultipleInstancesAllowed, validate
-
Methods inherited from interface jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationScheme
shouldSkip2FA
-
-
-
-
Constructor Detail
-
ForbiddingDomainsAuthenticationScheme
public ForbiddingDomainsAuthenticationScheme(@NotNull DomainIsolationProtection domainIsolationProtection, @NotNull WebLoginModel webLoginModel)
-
-
Method Detail
-
doGetName
@NotNull protected String doGetName()
- Specified by:
doGetName
in classHttpAuthenticationSchemeAdapter
-
processAuthenticationRequest
@NotNull public HttpAuthenticationResult processAuthenticationRequest(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @NotNull Map<String,String> properties) throws IOException
Description copied from interface:HttpAuthenticationScheme
Processes authentication request.
If the request does not correspond to this scheme, method must return HttpAuthenticationResult.notApplicable().
If response object is changed inside the method, method must return HttpAuthenticationResult.unauthenticated().- Specified by:
processAuthenticationRequest
in interfaceHttpAuthenticationScheme
- Overrides:
processAuthenticationRequest
in classHttpAuthenticationSchemeAdapter
- Parameters:
request
- requestresponse
- responseproperties
- properties from config file- Returns:
- result of processing, see above
- Throws:
IOException
- if some I/O error occurred
-
-