Class UserTokenProviders
java.lang.Object
org.alfresco.repo.security.authentication.identityservice.UserTokenProviders
Spring helper that selects the
UserTokenProvider implementation to expose to consumers based on the identity-service.authentication.userTokenCache.enabled flag.
Both the direct and the caching providers are constructed by Spring at startup; this helper merely returns one of them. Switching the flag therefore requires only a context reload, not a code change. Consumers receive UserTokenProvider and remain unaware of which implementation backs them.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UserTokenProviderchooseProvider(boolean cacheEnabled, UserTokenProvider direct, UserTokenProvider caching)
-
Method Details
-
chooseProvider
public static UserTokenProvider chooseProvider(boolean cacheEnabled, UserTokenProvider direct, UserTokenProvider caching) - Parameters:
cacheEnabled- value ofidentity-service.authentication.userTokenCache.enableddirect- the always-go-to-Keycloak providercaching- the local-JVM caching decorator wrappingdirect- Returns:
cachingwhen the flag is on, otherwisedirect
-