Package org.pac4j.core.profile.service
Class InMemoryProfileService<U extends CommonProfile>
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.profile.definition.ProfileDefinitionAware
org.pac4j.core.profile.service.AbstractProfileService<U>
org.pac4j.core.profile.service.InMemoryProfileService<U>
- All Implemented Interfaces:
Authenticator,ProfileService<U>
In-memory profile service.
- Since:
- 2.1.0
- Author:
- Elie Roux
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.pac4j.core.profile.service.AbstractProfileService
attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILEFields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE -
Constructor Summary
ConstructorsConstructorDescriptionInMemoryProfileService(Map<String, Map<String, Object>> profiles, ProfileFactory profileFactory) InMemoryProfileService(ProfileFactory profileFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteById(String id) Delete a profile by its identifier in the storage.protected voidInsert the attributes in the storage.protected voidinternalInit(boolean forceReinit) Internal initialization of the object.Read the list of defined attributes in the storage for key=value query.protected voidUpdate the attributes in the storage.Methods inherited from class org.pac4j.core.profile.service.AbstractProfileService
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getPasswordAttribute, getPasswordEncoder, getSerializer, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setPasswordAttribute, setPasswordEncoder, setSerializer, setUsernameAttribute, update, validateMethods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
defaultProfileDefinition, getProfileDefinition, setProfileDefinitionMethods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize
-
Field Details
-
profiles
-
profileFactory
-
-
Constructor Details
-
InMemoryProfileService
-
InMemoryProfileService
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) Description copied from class:InitializableObjectInternal initialization of the object.- Overrides:
internalInitin classAbstractProfileService<U extends CommonProfile>
-
insert
Description copied from class:AbstractProfileServiceInsert the attributes in the storage.- Specified by:
insertin classAbstractProfileService<U extends CommonProfile>- Parameters:
attributes- the attributes
-
update
Description copied from class:AbstractProfileServiceUpdate the attributes in the storage.- Specified by:
updatein classAbstractProfileService<U extends CommonProfile>- Parameters:
attributes- the attributes
-
deleteById
Description copied from class:AbstractProfileServiceDelete a profile by its identifier in the storage.- Specified by:
deleteByIdin classAbstractProfileService<U extends CommonProfile>- Parameters:
id- the identifier
-
read
Description copied from class:AbstractProfileServiceRead the list of defined attributes in the storage for key=value query.- Specified by:
readin classAbstractProfileService<U extends CommonProfile>- Parameters:
names- the attribute names to readkey- the key for the queryvalue- the value for the query- Returns:
- the list of map of attributes
-