Class LoadLinkedUserAuthorizationGenerator

java.lang.Object
org.pac4j.core.authorization.generator.LoadLinkedUserAuthorizationGenerator
All Implemented Interfaces:
AuthorizationGenerator

public class LoadLinkedUserAuthorizationGenerator extends Object implements AuthorizationGenerator
Load a linked account and replace the original account.
Since:
2.0.0
Author:
Jerome Leleu
  • Constructor Details

    • LoadLinkedUserAuthorizationGenerator

      public LoadLinkedUserAuthorizationGenerator()

      Constructor for LoadLinkedUserAuthorizationGenerator.

    • LoadLinkedUserAuthorizationGenerator

      public LoadLinkedUserAuthorizationGenerator(ProfileService profileService)

      Constructor for LoadLinkedUserAuthorizationGenerator.

      Parameters:
      profileService - a ProfileService object
  • Method Details

    • generate

      public Optional<UserProfile> generate(CallContext ctx, UserProfile profile)
      Generate the authorization information from and for the user profile.
      Specified by:
      generate in interface AuthorizationGenerator
      Parameters:
      ctx - the current context
      profile - the user profile for which to generate the authorization information.
      Returns:
      the updated profile or a new one (optional)