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
Modifier and TypeFieldDescriptionFields inherited from class org.pac4j.core.profile.service.AbstractProfileService
attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILE
Fields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE
-
Constructor Summary
ConstructorDescriptionInMemoryProfileService
(Map<String, Map<String, Object>> profiles, ProfileFactory profileFactory) InMemoryProfileService
(ProfileFactory profileFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteById
(String id) Delete a profile by its identifier in the storage.protected void
Insert the attributes in the storage.protected void
internalInit
(boolean forceReinit) Internal initialization of the object.Read the list of defined attributes in the storage for key=value query.protected void
Update the attributes in the storage.Methods inherited from class org.pac4j.core.profile.service.AbstractProfileService
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, isLegacyMode, remove, removeById, update, validate
Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
getProfileDefinition, setProfileDefinition, setProfileDefinitionIfUndefined
Methods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getNbAttempts, init, init, isInitialized, reinit, shouldInitialize
-
Field Details
-
profiles
-
profileFactory
-
-
Constructor Details
-
InMemoryProfileService
-
InMemoryProfileService
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) Description copied from class:InitializableObject
Internal initialization of the object.- Overrides:
internalInit
in classAbstractProfileService<U extends CommonProfile>
-
insert
Description copied from class:AbstractProfileService
Insert the attributes in the storage.- Specified by:
insert
in classAbstractProfileService<U extends CommonProfile>
- Parameters:
attributes
- the attributes
-
update
Description copied from class:AbstractProfileService
Update the attributes in the storage.- Specified by:
update
in classAbstractProfileService<U extends CommonProfile>
- Parameters:
attributes
- the attributes
-
deleteById
Description copied from class:AbstractProfileService
Delete a profile by its identifier in the storage.- Specified by:
deleteById
in classAbstractProfileService<U extends CommonProfile>
- Parameters:
id
- the identifier
-
read
Description copied from class:AbstractProfileService
Read the list of defined attributes in the storage for key=value query.- Specified by:
read
in 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
-