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 classPresignedArtifactLinksManager.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 voidcheckAccess(SBuild build)StringgetDescription()User-friendly description of what's the purpose of the domainsList<String>getDomains()The additional domains.booleanisEnabled()booleanisEnabled(SBuild build)booleanmatchesPath(javax.servlet.http.HttpServletRequest request)PresignedArtifactLinksManager.TokenWithPathparseTokenAndPath(String pathWithoutContext)StringpathWithoutAuth(javax.servlet.http.HttpServletRequest request)org.springframework.web.servlet.ModelAndViewredirectToPresignedUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SBuild build)booleanshouldRedirect(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:AdditionalCspDomainsThe additional domains. Should be a list of valid URLs- Specified by:
 getDomainsin 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:AdditionalCspDomainsUser-friendly description of what's the purpose of the domains- Specified by:
 getDescriptionin interfaceAdditionalCspDomains- Returns:
 - description string
 
 
 - 
 
 -