Class PresignedArtifactLinksManager
- java.lang.Object
-
- jetbrains.buildServer.controllers.presigned.PresignedArtifactLinksManager
-
- All Implemented Interfaces:
ServerExtension
,TeamCityExtension
,AdditionalCspDomains
,ForbiddenLoginDomains
public class PresignedArtifactLinksManager extends Object implements ForbiddenLoginDomains
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PresignedArtifactLinksManager.TokenWithPath
-
Constructor Summary
Constructors Constructor Description PresignedArtifactLinksManager(PresignedTokenStorage presignedTokenStorage, SecurityContextEx securityContextEx, DomainIsolationProtection domainIsolationProtection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAccess(SBuild build)
String
getDescription()
User-friendly description of what's the purpose of the domainsList<String>
getDomains()
The additional domains.boolean
isEnabled()
boolean
isEnabled(SBuild build)
boolean
matchesPath(javax.servlet.http.HttpServletRequest request)
PresignedArtifactLinksManager.TokenWithPath
parseTokenAndPath(String pathWithoutContext)
String
pathWithoutAuth(javax.servlet.http.HttpServletRequest request)
org.springframework.web.servlet.ModelAndView
redirectToPresignedUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SBuild build)
boolean
shouldRedirect(javax.servlet.http.HttpServletRequest request, SBuild build)
-
-
-
Constructor Detail
-
PresignedArtifactLinksManager
public PresignedArtifactLinksManager(@NotNull PresignedTokenStorage presignedTokenStorage, @NotNull SecurityContextEx securityContextEx, @NotNull DomainIsolationProtection domainIsolationProtection)
-
-
Method Detail
-
shouldRedirect
public boolean shouldRedirect(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull SBuild build)
-
isEnabled
public boolean isEnabled(@NotNull SBuild build)
-
isEnabled
public boolean isEnabled()
-
getDomains
@NotNull public List<String> getDomains()
Description copied from interface:AdditionalCspDomains
The additional domains. Should be a list of valid URLs- Specified by:
getDomains
in interfaceAdditionalCspDomains
- Returns:
- empty list only if not
isEnabled()
, list of valid URL strings otherwise
-
redirectToPresignedUrl
@NotNull public org.springframework.web.servlet.ModelAndView redirectToPresignedUrl(@NotNull javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @NotNull SBuild build)
-
pathWithoutAuth
public String pathWithoutAuth(@NotNull javax.servlet.http.HttpServletRequest request)
-
parseTokenAndPath
@NotNull public PresignedArtifactLinksManager.TokenWithPath parseTokenAndPath(@NotNull String pathWithoutContext)
-
checkAccess
public void checkAccess(SBuild build)
-
matchesPath
public boolean matchesPath(@NotNull javax.servlet.http.HttpServletRequest request)
-
getDescription
@NotNull public String getDescription()
Description copied from interface:AdditionalCspDomains
User-friendly description of what's the purpose of the domains- Specified by:
getDescription
in interfaceAdditionalCspDomains
- Returns:
- description string
-
-