Class ScopesRequestCacheDelegate
- java.lang.Object
-
- com.atlassian.confluence.impl.security.delegate.ScopesRequestCacheDelegate
-
public class ScopesRequestCacheDelegate extends Object
Delegate class for ScopesRequestCache which is provided by the oauth2-scopes-plugin. As the plugin could be disabled or uninstalled at any time this class ensures that the Application will continue to run as expected in that unlikely scenario See below for the implementation of ScopesRequestCache and the corresponding filter that adds the scopes to the RequestCache https://stash.atlassian.com/projects/CWD/repos/atlassian-oauth2/browse/scopes/scopes-plugin/src/main/java/com/atlassian/oauth2/scopes/request/DefaultScopesRequestCache.java https://stash.atlassian.com/projects/CWD/repos/atlassian-oauth2/browse/provider/provider-core/src/main/java/com/atlassian/oauth2/provider/core/web/AccessTokenFilter.java- Since:
- 7.17
-
-
Constructor Summary
Constructors Constructor Description ScopesRequestCacheDelegate(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, ConfluenceThreadLocalContextManager contextManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearRequestCache()
Optional<String>
getApplicationNameForRequest()
Optional<com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache>
getRequestCache()
boolean
hasPermission(Permission permission, Object target)
boolean
hasPermission(String permission, Object target)
void
injectIntoContextManager()
void
setRequestCache(com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache requestCache)
-
-
-
Constructor Detail
-
ScopesRequestCacheDelegate
public ScopesRequestCacheDelegate(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, ConfluenceThreadLocalContextManager contextManager)
-
-
Method Detail
-
injectIntoContextManager
@PostConstruct public void injectIntoContextManager()
-
hasPermission
public boolean hasPermission(Permission permission, Object target)
-
getRequestCache
public Optional<com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache> getRequestCache()
-
setRequestCache
public void setRequestCache(com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache requestCache)
-
clearRequestCache
public void clearRequestCache()
-
-