Class InMemoryIdentityStore
java.lang.Object
cloud.piranha.micro.shrinkwrap.core.InMemoryIdentityStore
- All Implemented Interfaces:
jakarta.security.enterprise.identitystore.IdentityStore
@ApplicationScoped
public class InMemoryIdentityStore
extends Object
implements jakarta.security.enterprise.identitystore.IdentityStore
A basic in-memory identity store.
This identity store functions as the default identity store for among others Servlet security.
- Author:
- Arjan Tijms
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.security.enterprise.identitystore.IdentityStore
jakarta.security.enterprise.identitystore.IdentityStore.ValidationType
-
Field Summary
Fields inherited from interface jakarta.security.enterprise.identitystore.IdentityStore
DEFAULT_VALIDATION_TYPES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCredential
(InMemoryIdentityStore.Credential credential) Add the credential.static void
addCredential
(String callerName, String password, List<String> groups) Add the credential.getCallerGroups
(jakarta.security.enterprise.identitystore.CredentialValidationResult validationResult) Returns the caller to credentials map.jakarta.security.enterprise.identitystore.CredentialValidationResult
validate
(jakarta.security.enterprise.credential.UsernamePasswordCredential usernamePasswordCredential) Validate the username password credential.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.security.enterprise.identitystore.IdentityStore
priority, validate, validationTypes
-
Constructor Details
-
InMemoryIdentityStore
public InMemoryIdentityStore()
-
-
Method Details
-
getCallerToCredentials
Returns the caller to credentials map.- Returns:
- the caller to credentials map
-
addCredential
Add the credential.- Parameters:
callerName
- the caller name.password
- the password.groups
- the groups.
-
addCredential
Add the credential.- Parameters:
credential
- the credential.
-
validate
public jakarta.security.enterprise.identitystore.CredentialValidationResult validate(jakarta.security.enterprise.credential.UsernamePasswordCredential usernamePasswordCredential) Validate the username password credential.- Parameters:
usernamePasswordCredential
- the username password credential.- Returns:
- the credential validation result.
-
getCallerGroups
public Set<String> getCallerGroups(jakarta.security.enterprise.identitystore.CredentialValidationResult validationResult) - Specified by:
getCallerGroups
in interfacejakarta.security.enterprise.identitystore.IdentityStore
-