Class DefaultAuthorizationService
java.lang.Object
de.hybris.platform.cpq.productconfig.services.impl.DefaultAuthorizationService
- All Implemented Interfaces:
AuthorizationService
Default implementation of
AuthorizationService-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuthorizationService(CacheAccessService<DefaultCacheKey, AuthorizationData> cacheAccessService, CacheKeyService cacheKeyService, StrategyDeterminationService<AuthorizationStrategy> authorizationStrategyDeterminationService) Default Constructor.DefaultAuthorizationService(CacheAccessService<DefaultCacheKey, AuthorizationData> cacheAccessService, CacheKeyService cacheKeyService, StrategyDeterminationService<AuthorizationStrategy> authorizationStrategyDeterminationService, CacheAccessService<DefaultCacheKey, AuthorizationData> clientAuthorizationCacheAccessService) Default Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet data used for initiating a CPQ session with admin scope.getAuthorizationDataForClient(String ownerId) Get data used for initiating a CPQ session with a limited scope for a given owner id.protected CacheAccessService<DefaultCacheKey,AuthorizationData> protected CacheKeyServiceprotected CacheAccessService<DefaultCacheKey,AuthorizationData> booleanVerifies if the client authorization data already cached for the given ownerprotected booleanisTokenExpired(AuthorizationData cachedClientAuthorizationData) protected AuthorizationDataretrieveAuthorizationData(CpqCredentialsData credentials)
-
Constructor Details
-
DefaultAuthorizationService
public DefaultAuthorizationService(CacheAccessService<DefaultCacheKey, AuthorizationData> cacheAccessService, CacheKeyService cacheKeyService, StrategyDeterminationService<AuthorizationStrategy> authorizationStrategyDeterminationService) Default Constructor. Expects all required dependencies as constructor args- Parameters:
cacheAccessService- admin cache access servicecacheKeyService- cache key serviceauthorizationStrategyDeterminationService- to decide whether to use mock or default authorization strategy
-
DefaultAuthorizationService
public DefaultAuthorizationService(CacheAccessService<DefaultCacheKey, AuthorizationData> cacheAccessService, CacheKeyService cacheKeyService, StrategyDeterminationService<AuthorizationStrategy> authorizationStrategyDeterminationService, CacheAccessService<DefaultCacheKey, AuthorizationData> clientAuthorizationCacheAccessService) Default Constructor. Expects all required dependencies as constructor args- Parameters:
cacheAccessService- admin cache access servicecacheKeyService- cache key serviceauthorizationStrategyDeterminationService- to decide whether to use mock or default authorization strategyclientAuthorizationCacheAccessService- client cache access service
-
-
Method Details
-
getCacheAccessService
-
getCacheKeyService
-
getAuthorizationDataForAdmin
Description copied from interface:AuthorizationServiceGet data used for initiating a CPQ session with admin scope. This is derived from the destination maintained forCpqClientattached to the current base site- Specified by:
getAuthorizationDataForAdminin interfaceAuthorizationService- Returns:
- Attributes for initiating a CPQ session, including an oAuth2 token
-
retrieveAuthorizationData
-
getAuthorizationDataForClient
Description copied from interface:AuthorizationServiceGet data used for initiating a CPQ session with a limited scope for a given owner id. This is derived from the destination maintained forCpqClientattached to the current base site- Specified by:
getAuthorizationDataForClientin interfaceAuthorizationService- Parameters:
ownerId- owner id of the client- Returns:
- Attributes for initiating a CPQ session, including an oAuth2 token
-
isAuthorizationDataForClientInCache
Description copied from interface:AuthorizationServiceVerifies if the client authorization data already cached for the given owner- Specified by:
isAuthorizationDataForClientInCachein interfaceAuthorizationService- Parameters:
ownerId- owner id of the client- Returns:
- true if client authorization data already cached for the given owner
-
isTokenExpired
-
getAuthorizationStrategyDeterminationService
protected StrategyDeterminationService<AuthorizationStrategy> getAuthorizationStrategyDeterminationService() -
getClientAuthorizationCacheAccessService
protected CacheAccessService<DefaultCacheKey,AuthorizationData> getClientAuthorizationCacheAccessService()
-