Class RealmUserLookup

java.lang.Object
org.elasticsearch.xpack.security.authc.support.RealmUserLookup

public class RealmUserLookup extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    RealmUserLookup(List<? extends org.elasticsearch.xpack.core.security.authc.Realm> realms, org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.elasticsearch.xpack.core.security.authc.Realm>
     
    boolean
     
    void
    lookup(String principal, org.elasticsearch.action.ActionListener<org.elasticsearch.core.Tuple<org.elasticsearch.xpack.core.security.user.User,org.elasticsearch.xpack.core.security.authc.Realm>> listener)
    Lookup the principal in the list of realms.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RealmUserLookup

      public RealmUserLookup(List<? extends org.elasticsearch.xpack.core.security.authc.Realm> realms, org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
  • Method Details

    • getRealms

      public List<org.elasticsearch.xpack.core.security.authc.Realm> getRealms()
    • hasRealms

      public boolean hasRealms()
    • lookup

      public void lookup(String principal, org.elasticsearch.action.ActionListener<org.elasticsearch.core.Tuple<org.elasticsearch.xpack.core.security.user.User,org.elasticsearch.xpack.core.security.authc.Realm>> listener)
      Lookup the principal in the list of realms. The realms are consulted in order. When one realm responds with a non-null User, this is returned with the matching realm, through the listener. If no user if found (including the case where the realms list is empty), then ActionListener.onResponse(Object) is called with a null Tuple.