Class PresignedTokenHttpAuthenticationScheme
- java.lang.Object
-
- jetbrains.buildServer.serverSide.auth.AuthModuleTypeAdapter
-
- jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationSchemeAdapter
-
- jetbrains.buildServer.controllers.interceptors.auth.presigned.impl.PresignedTokenHttpAuthenticationScheme
-
- All Implemented Interfaces:
HttpAuthenticationScheme
,HttpLoginSupport
,AuthModuleType
,SystemAuthModuleType
,ServerExtension
,TeamCityExtension
public class PresignedTokenHttpAuthenticationScheme extends HttpAuthenticationSchemeAdapter implements SystemAuthModuleType, HttpLoginSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
PATH_PREFIX
-
Constructor Summary
Constructors Constructor Description PresignedTokenHttpAuthenticationScheme(PresignedArtifactLinksManager presignedArtifactLinksManager, PresignedTokenStorage presignedTokenStorage, ServerSettings serverSettings, ServerLoginModel serverLoginModel, PathModifiers pathModifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doGetName()
void
init()
boolean
isApplicable(javax.servlet.http.HttpServletRequest request)
boolean
isEnabled()
boolean
login(ServerPrincipal principal)
Tries to login the specified user.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
-
-
-
-
Field Detail
-
PATH_PREFIX
@NotNull public static final String PATH_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PresignedTokenHttpAuthenticationScheme
public PresignedTokenHttpAuthenticationScheme(@NotNull PresignedArtifactLinksManager presignedArtifactLinksManager, @NotNull PresignedTokenStorage presignedTokenStorage, @NotNull ServerSettings serverSettings, @NotNull ServerLoginModel serverLoginModel, @NotNull PathModifiers pathModifiers)
-
-
Method Detail
-
init
public void init()
-
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
-
login
public boolean login(@NotNull ServerPrincipal principal) throws AuthenticationFailedException
Description copied from interface:HttpLoginSupport
Tries to login the specified user.- Specified by:
login
in interfaceHttpLoginSupport
- Parameters:
principal
- principal- Returns:
- true in case of successful login, false otherwise (or if the specified user cannot be logged in with this support)
- Throws:
AuthenticationFailedException
-
isEnabled
public boolean isEnabled()
-
isApplicable
public boolean isApplicable(@NotNull javax.servlet.http.HttpServletRequest request)
-
-