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 SpaceClientFactory
mySpaceClientFactory
protected SpaceService
mySpaceService
-
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 protected
SpaceOAuthPopupControllerBase(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.ModelAndView
doWithToken(OAuthToken curOAuthToken, OAuthConnectionDescriptor opb, org.springframework.web.servlet.ModelAndView modelAndView, String vcsType)
Do something with the token that we acquired, e.g.protected void
fillFallbackModel(Map<String,Object> model, OAuthConnectionDescriptor connection, OAuthToken curOAuthToken)
protected OAuthToken
findExistingToken(TokenStorageUserQuery query)
protected String
getAccessTokenControllerPath()
protected org.springframework.web.servlet.ModelAndView
getFallbackModelForPending(org.springframework.web.servlet.ModelAndView modelAndView, OAuthConnectionDescriptor connection, OAuthToken curOAuthToken)
protected TokenIntent
getTokenIntent()
protected static org.springframework.web.servlet.ModelAndView
handleSpaceRequestException(org.springframework.web.servlet.ModelAndView modelAndView, SpaceRequestException e, String errorMessage)
protected static org.springframework.web.servlet.ModelAndView
handleUnexpecedException(org.springframework.web.servlet.ModelAndView modelAndView, RuntimeException e, String errorMessage)
protected org.springframework.web.servlet.ModelAndView
redirectToAccessTokenController(javax.servlet.http.HttpServletRequest request, String projectId, String connectionId, OAuthConnectionDescriptor opb, String showMode)
protected static org.springframework.web.servlet.ModelAndView
withError(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:
getAccessTokenControllerPath
in classOAuthPopupControllerBase
-
findExistingToken
@Nullable protected OAuthToken findExistingToken(@NotNull TokenStorageUserQuery query)
- Overrides:
findExistingToken
in 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:
redirectToAccessTokenController
in 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 Exception
Description copied from class:OAuthPopupControllerBase
Do something with the token that we acquired, e.g. list repositories.- Specified by:
doWithToken
in 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)
-
-