Class LoadLinkedUserAuthorizationGenerator
- java.lang.Object
-
- org.pac4j.core.util.InitializableObject
-
- org.pac4j.core.authorization.generator.LoadLinkedUserAuthorizationGenerator
-
- All Implemented Interfaces:
AuthorizationGenerator
public class LoadLinkedUserAuthorizationGenerator extends InitializableObject implements AuthorizationGenerator
Load a linked account and replace the original account.- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
-
Constructor Summary
Constructors Constructor Description LoadLinkedUserAuthorizationGenerator()
LoadLinkedUserAuthorizationGenerator(ProfileService profileService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<UserProfile>
generate(WebContext context, UserProfile profile)
Generate the authorization information from and for the user profile.ProfileService
getProfileService()
protected void
internalInit()
Internal initialization of the object.boolean
isFailIfLinkedUserNotFound()
void
setFailIfLinkedUserNotFound(boolean failIfLinkedUserNotFound)
void
setProfileService(ProfileService profileService)
String
toString()
-
Methods inherited from class org.pac4j.core.util.InitializableObject
init, isInitialized
-
-
-
-
Constructor Detail
-
LoadLinkedUserAuthorizationGenerator
public LoadLinkedUserAuthorizationGenerator()
-
LoadLinkedUserAuthorizationGenerator
public LoadLinkedUserAuthorizationGenerator(ProfileService profileService)
-
-
Method Detail
-
internalInit
protected void internalInit()
Description copied from class:InitializableObject
Internal initialization of the object.- Specified by:
internalInit
in classInitializableObject
-
generate
public Optional<UserProfile> generate(WebContext context, UserProfile profile)
Description copied from interface:AuthorizationGenerator
Generate the authorization information from and for the user profile.- Specified by:
generate
in interfaceAuthorizationGenerator
- Parameters:
context
- the web contextprofile
- the user profile for which to generate the authorization information.- Returns:
- the updated profile or a new one (optional)
-
getProfileService
public ProfileService getProfileService()
-
setProfileService
public void setProfileService(ProfileService profileService)
-
isFailIfLinkedUserNotFound
public boolean isFailIfLinkedUserNotFound()
-
setFailIfLinkedUserNotFound
public void setFailIfLinkedUserNotFound(boolean failIfLinkedUserNotFound)
-
-