Class SpaceOAuthPopupControllerBase
- java.lang.Object
-
- org.springframework.context.support.ApplicationObjectSupport
-
- org.springframework.web.context.support.WebApplicationObjectSupport
-
- org.springframework.web.servlet.support.WebContentGenerator
-
- org.springframework.web.servlet.mvc.AbstractController
-
- jetbrains.buildServer.controllers.BaseController
-
- jetbrains.buildServer.serverSide.oauth.OAuthPopupControllerBase
-
- jetbrains.buildServer.serverSide.oauth.space.SpaceOAuthPopupControllerBase
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.web.context.ServletContextAware,org.springframework.web.servlet.mvc.Controller
- Direct Known Subclasses:
SpaceGetTokenPopupController,SpaceShowProjectsController,SpaceShowRepositoriesController
public abstract class SpaceOAuthPopupControllerBase extends OAuthPopupControllerBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jetbrains.buildServer.serverSide.oauth.OAuthPopupControllerBase
OAuthPopupControllerBase.HandlerContext
-
-
Field Summary
Fields Modifier and Type Field Description protected SpaceClientFactorymySpaceClientFactoryprotected SpaceServicemySpaceService-
Fields inherited from class jetbrains.buildServer.serverSide.oauth.OAuthPopupControllerBase
myAdminPermissionsUtil, myOauthConnectionsManager, myOAuthTokensStorage, myPath, mySslTrustStoreProvider
-
Fields inherited from class jetbrains.buildServer.controllers.BaseController
myServer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpaceOAuthPopupControllerBase(String path, WebControllerManager controllerManager, OAuthConnectionsManager oauthConnectionsManager, ProjectManager projectManager, OAuthTokensStorage OAuthTokensStorage, AdminPermissionsUtil adminPermissionsUtil, WebLoginModel webLoginModel, SSLTrustStoreProvider sslTrustStoreProvider, SpaceClientFactory spaceClientFactory, SpaceService spaceService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.servlet.ModelAndViewdoWithToken(OAuthToken curOAuthToken, OAuthConnectionDescriptor opb, org.springframework.web.servlet.ModelAndView modelAndView, String vcsType)Do something with the token that we acquired, e.g.protected voidfillFallbackModel(Map<String,Object> model, OAuthConnectionDescriptor connection, OAuthToken curOAuthToken)protected OAuthTokenfindExistingToken(TokenStorageUserQuery query)protected StringgetAccessTokenControllerPath()protected org.springframework.web.servlet.ModelAndViewgetFallbackModelForPending(org.springframework.web.servlet.ModelAndView modelAndView, OAuthConnectionDescriptor connection, OAuthToken curOAuthToken)protected TokenIntentgetTokenIntent()protected static org.springframework.web.servlet.ModelAndViewhandleSpaceRequestException(org.springframework.web.servlet.ModelAndView modelAndView, SpaceRequestException e, String errorMessage)protected static org.springframework.web.servlet.ModelAndViewhandleUnexpecedException(org.springframework.web.servlet.ModelAndView modelAndView, RuntimeException e, String errorMessage)protected org.springframework.web.servlet.ModelAndViewredirectToAccessTokenController(javax.servlet.http.HttpServletRequest request, String projectId, String connectionId, OAuthConnectionDescriptor opb, String showMode)protected static org.springframework.web.servlet.ModelAndViewwithError(org.springframework.web.servlet.ModelAndView modelAndView, String errorMessage)-
Methods inherited from class jetbrains.buildServer.serverSide.oauth.OAuthPopupControllerBase
buildCallbackUrl, buildNewTokenRequestParams, checkRepositoryAccess, determineAccessibleEntities, determineProjectScope, determineTokenIntent, determineTokenIntentType, doHandle, findMatchingToken, findNewlyIssuedToken, finish, getCurrentProject, getScope, getScope, getShowMode, handleTokenObtained, isReuseWindow, loadAndUseTokenIfPossible, newModelAndView, noExplicitProjectScopeRequested, postProcessAfterToken, prepareContext, prepareToAcquireToken, rememberIssueTokenParameters, startAuthCodeFlowIfNecessary, validateVcsTypeParameter
-
Methods inherited from class jetbrains.buildServer.controllers.BaseController
getOrCreateMessages, handleRequest, handleRequestInternal, isGet, isPost, redirectTo, setExceptionResolvers, simpleView
-
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
isSynchronizeOnSession, setSynchronizeOnSession
-
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeaders
-
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
-
-
-
-
Field Detail
-
mySpaceClientFactory
@NotNull protected final SpaceClientFactory mySpaceClientFactory
-
mySpaceService
@NotNull protected final SpaceService mySpaceService
-
-
Constructor Detail
-
SpaceOAuthPopupControllerBase
protected SpaceOAuthPopupControllerBase(@NotNull String path, @NotNull WebControllerManager controllerManager, @NotNull OAuthConnectionsManager oauthConnectionsManager, @NotNull ProjectManager projectManager, @NotNull OAuthTokensStorage OAuthTokensStorage, @NotNull AdminPermissionsUtil adminPermissionsUtil, @NotNull WebLoginModel webLoginModel, @NotNull SSLTrustStoreProvider sslTrustStoreProvider, @NotNull SpaceClientFactory spaceClientFactory, @NotNull SpaceService spaceService)
-
-
Method Detail
-
getTokenIntent
protected TokenIntent getTokenIntent()
-
getAccessTokenControllerPath
@NotNull protected String getAccessTokenControllerPath()
- Specified by:
getAccessTokenControllerPathin classOAuthPopupControllerBase
-
findExistingToken
@Nullable protected OAuthToken findExistingToken(@NotNull TokenStorageUserQuery query)
- Overrides:
findExistingTokenin classOAuthPopupControllerBase
-
redirectToAccessTokenController
@NotNull protected org.springframework.web.servlet.ModelAndView redirectToAccessTokenController(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String projectId, @NotNull String connectionId, @NotNull OAuthConnectionDescriptor opb, @NotNull String showMode)- Overrides:
redirectToAccessTokenControllerin classOAuthPopupControllerBase
-
doWithToken
@NotNull protected org.springframework.web.servlet.ModelAndView doWithToken(@NotNull OAuthToken curOAuthToken, @NotNull OAuthConnectionDescriptor opb, @NotNull org.springframework.web.servlet.ModelAndView modelAndView, @Nullable String vcsType) throws ExceptionDescription copied from class:OAuthPopupControllerBaseDo something with the token that we acquired, e.g. list repositories.- Specified by:
doWithTokenin classOAuthPopupControllerBase- Parameters:
curOAuthToken- tokenopb- connection describermodelAndView- model and viewvcsType- VCS type- Throws:
Exception
-
getFallbackModelForPending
@Nullable protected org.springframework.web.servlet.ModelAndView getFallbackModelForPending(@NotNull org.springframework.web.servlet.ModelAndView modelAndView, @NotNull OAuthConnectionDescriptor connection, @NotNull OAuthToken curOAuthToken)
-
fillFallbackModel
protected void fillFallbackModel(@NotNull Map<String,Object> model, OAuthConnectionDescriptor connection, OAuthToken curOAuthToken)
-
handleSpaceRequestException
@NotNull protected static org.springframework.web.servlet.ModelAndView handleSpaceRequestException(@NotNull org.springframework.web.servlet.ModelAndView modelAndView, @NotNull SpaceRequestException e, @NotNull String errorMessage)
-
handleUnexpecedException
@NotNull protected static org.springframework.web.servlet.ModelAndView handleUnexpecedException(@NotNull org.springframework.web.servlet.ModelAndView modelAndView, @NotNull RuntimeException e, @NotNull String errorMessage)
-
withError
@NotNull protected static org.springframework.web.servlet.ModelAndView withError(@NotNull org.springframework.web.servlet.ModelAndView modelAndView, @NotNull String errorMessage)
-
-