spray.routing.authentication

LdapAuthConfig

trait LdapAuthConfig[T] extends AnyRef

The LdapAuthenticator faciliates user/password authentication against an LDAP server. It delegates the application specific parts of the LDAP configuration to the given LdapAuthConfig instance, which is also responsible for creating the object representing the application-specific user context.

Authentication against an LDAP server is done in two separate steps: First, some "search credentials" are used to log into the LDAP server and perform a search for the directory entry matching a given user name. If exactly one user entry is found another LDAP bind operation is performed using the principal DN of the found user entry to validate the password.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LdapAuthConfig
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def configureSearchControls(searchControls: SearchControls, user: String): Unit

    Configures the given searchControls instance according the application-specific requirements.

    Configures the given searchControls instance according the application-specific requirements. For example:

    searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE)
    searchControls.setReturningAttributes(Array("givenName", "sn"))
  2. abstract def contextEnv(user: String, pass: String): Seq[(String, String)]

    The application-specific environment properties for the InitialLdapContext.

    The application-specific environment properties for the InitialLdapContext. If the application uses 'simple' security authentication then the only required setting is the one configuring the LDAP server and port:

    javax.naming.Context.PROVIDER_URL -> "ldap://ldap.testathon.net:389"

    However, you can set any of the properties defined in javax.naming.Context. (If a Context.SECURITY_PRINCIPAL property is specified it overrides the one created by the securityPrincipal method).

    In addition to configuring the properties with this method the application can also choose to have this method return a Seq.empty and configure all settings in a jndi.properties file on the classpath. A combination of the two is also allowed.

  3. abstract def createUserObject(queryResult: LdapQueryResult): Option[T]

    Creates a user object from the given LDAP query result.

    Creates a user object from the given LDAP query result. The method can also choose to return None, in which case authentication will fail.

  4. abstract def searchBase(user: String): String

    The DN of the entity to base the directory search on.

    The DN of the entity to base the directory search on. For example:

    def searchBase(user: String) = "OU=users,DC=testathon,DC=net"
  5. abstract def searchCredentials: (String, String)

    Returns the credentials used to bind to the LDAP server in order to search for a matching user entry.

    Returns the credentials used to bind to the LDAP server in order to search for a matching user entry. For example:

    val searchCredentials = "CN=stuart,OU=users,DC=testathon,DC=net" -> "stuart"
  6. abstract def searchFilter(user: String): String

    The search filter to use for searching for the user entry.

    The search filter to use for searching for the user entry. For example:

    def searchFilter(user: String) = "(uid=%s)" format user

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  16. def toString(): String

    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped