SimpleAuth v1.10.1 SimpleAuth.LdapHelperAPI behaviour View Source

API for authentication

Link to this section Summary

Callbacks

Builds the LDAP user to be passed to ldap from the username. This should be a very simple function that just returns for example "myorg\"

Invoked when adding a new user. The user struct can be enhanced with extra properties if required Returns the enhanced user struct

Link to this section Types

Link to this type

option()

View Source
option() :: {:new_user, boolean()}

Link to this section Callbacks

Link to this callback

build_ldap_user(username)

View Source
build_ldap_user(username :: term()) :: term()

Builds the LDAP user to be passed to ldap from the username. This should be a very simple function that just returns for example "myorg\"

Link to this callback

enhance_user(user, connection, list)

View Source
enhance_user(user :: term(), connection :: term(), [option()]) :: term()

Invoked when adding a new user. The user struct can be enhanced with extra properties if required Returns the enhanced user struct