Class InMemoryIdentityStore

java.lang.Object
cloud.piranha.micro.core.InMemoryIdentityStore
All Implemented Interfaces:
javax.security.enterprise.identitystore.IdentityStore

@ApplicationScoped
public class InMemoryIdentityStore
extends java.lang.Object
implements javax.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 
    Modifier and Type Class Description
    static class  InMemoryIdentityStore.Credential  

    Nested classes/interfaces inherited from interface javax.security.enterprise.identitystore.IdentityStore

    javax.security.enterprise.identitystore.IdentityStore.ValidationType
  • Field Summary

    Fields inherited from interface javax.security.enterprise.identitystore.IdentityStore

    DEFAULT_VALIDATION_TYPES
  • Constructor Summary

    Constructors 
    Constructor Description
    InMemoryIdentityStore()  
  • Method Summary

    Modifier and Type Method Description
    static void addCredential​(InMemoryIdentityStore.Credential credentials)  
    static void addCredential​(java.lang.String callerName, java.lang.String password, java.util.List<java.lang.String> groups)  
    static java.util.Map<java.lang.String,​InMemoryIdentityStore.Credential> getCALLER_TO_CREDENTIALS()  
    java.util.Set<java.lang.String> getCallerGroups​(javax.security.enterprise.identitystore.CredentialValidationResult validationResult)  
    javax.security.enterprise.identitystore.CredentialValidationResult validate​(javax.security.enterprise.credential.UsernamePasswordCredential usernamePasswordCredential)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.security.enterprise.identitystore.IdentityStore

    priority, validate, validationTypes
  • Constructor Details

  • Method Details

    • getCALLER_TO_CREDENTIALS

      public static java.util.Map<java.lang.String,​InMemoryIdentityStore.Credential> getCALLER_TO_CREDENTIALS()
    • addCredential

      public static void addCredential​(java.lang.String callerName, java.lang.String password, java.util.List<java.lang.String> groups)
    • addCredential

      public static void addCredential​(InMemoryIdentityStore.Credential credentials)
    • validate

      public javax.security.enterprise.identitystore.CredentialValidationResult validate​(javax.security.enterprise.credential.UsernamePasswordCredential usernamePasswordCredential)
    • getCallerGroups

      public java.util.Set<java.lang.String> getCallerGroups​(javax.security.enterprise.identitystore.CredentialValidationResult validationResult)
      Specified by:
      getCallerGroups in interface javax.security.enterprise.identitystore.IdentityStore