You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2023/03/18 12:56:00 UTC
[jira] [Closed] (CAUSEWAY-2886) [NOT A PROBLEM] @Lazy may be required for AuthenticationManager
[ https://issues.apache.org/jira/browse/CAUSEWAY-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Keir Haywood closed CAUSEWAY-2886.
-----------------------------------------
Resolution: Fixed
> [NOT A PROBLEM] @Lazy may be required for AuthenticationManager
> ---------------------------------------------------------------
>
> Key: CAUSEWAY-2886
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-2886
> Project: Causeway
> Issue Type: Improvement
> Reporter: Daniel Keir Haywood
> Priority: Minor
> Fix For: 2.0.0-RC1
>
>
> adding another @Lazy was needed to fix integ tests, hitting a circular dependency issue.
>
> The file in question is AuthenticationManager.
>
> @Service
> @Named("isis.security.AuthenticationManager")
> @Priority(PriorityPrecedence.FIRST)
> public class AuthenticationManager {
> @Getter private final @NonNull Can<Authenticator> authenticators;
> private final Map<String, String> userByValidationCode = _Maps.newConcurrentHashMap();
> private final @NonNull InteractionService interactionService;
> private final @NonNull RandomCodeGenerator randomCodeGenerator;
> private final @NonNull Can<Registrar> registrars;
> private final @NonNull List<UserMementoRefiner> userMementoRefiners;
> @Inject
> public AuthenticationManager(
> final List<Authenticator> authenticators,
> // needs @Lazy due to circular provisioning dependency
> final @Lazy InteractionService anonymousInteractionFactory,
> final RandomCodeGenerator randomCodeGenerator,
> final @Lazy List<UserMementoRefiner> userMementoRefiners) {
>
> I made a local copy of the service and set the priority. It was adding @Lazy to userMementoRefiners that did the trick.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)