Class ScopesRequestCacheDelegateImpl
java.lang.Object
com.atlassian.confluence.impl.security.delegate.ScopesRequestCacheDelegateImpl
- All Implemented Interfaces:
ScopesRequestCacheDelegate
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.confluence.dmz.security.delegate.ScopesRequestCacheDelegate
ScopesRequestCacheDelegate.Registrar -
Constructor Summary
ConstructorsConstructorDescriptionScopesRequestCacheDelegateImpl(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, ScopesRequestCacheDelegate.Registrar registrar) -
Method Summary
Modifier and TypeMethodDescriptionvoidOptional<com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache>booleanhasPermission(Permission permission, Object target) booleanhasPermission(String permission, Object target) voidbooleanisScopePermitted(String scope) Checks if the current request has credentials or an access token that permittes the given scope.voidsetRequestCache(com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache requestCache)
-
Constructor Details
-
ScopesRequestCacheDelegateImpl
public ScopesRequestCacheDelegateImpl(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, ScopesRequestCacheDelegate.Registrar registrar)
-
-
Method Details
-
injectIntoContextManager
@PostConstruct public void injectIntoContextManager() -
hasPermission
- Specified by:
hasPermissionin interfaceScopesRequestCacheDelegate
-
hasPermission
- Specified by:
hasPermissionin interfaceScopesRequestCacheDelegate
-
isScopePermitted
Description copied from interface:ScopesRequestCacheDelegateChecks if the current request has credentials or an access token that permittes the given scope.- Specified by:
isScopePermittedin interfaceScopesRequestCacheDelegate- Parameters:
scope- the scope to check- Returns:
- true, if the scope is permitted for the current request
-
getApplicationNameForRequest
- Specified by:
getApplicationNameForRequestin interfaceScopesRequestCacheDelegate
-
getRequestCache
- Specified by:
getRequestCachein interfaceScopesRequestCacheDelegate
-
setRequestCache
public void setRequestCache(com.atlassian.oauth2.scopes.api.ScopesRequestCache.RequestCache requestCache) - Specified by:
setRequestCachein interfaceScopesRequestCacheDelegate
-
clearRequestCache
public void clearRequestCache()- Specified by:
clearRequestCachein interfaceScopesRequestCacheDelegate
-