mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-08 13:12:12 +00:00
Minor doc/javadoc updates to clarify use of UserDetailsContextapper.
This commit is contained in:
parent
3b8fbe8bee
commit
657a69b906
@ -364,16 +364,18 @@ public interface UserDetailsContextMapper {
|
|||||||
|
|
||||||
void mapUserToContext(UserDetails user, DirContextAdapter ctx);
|
void mapUserToContext(UserDetails user, DirContextAdapter ctx);
|
||||||
}]]>
|
}]]>
|
||||||
</programlisting> Only the first method is relevant for
|
</programlisting> Only the first method is relevant for authentication. If you
|
||||||
authentication. If you provide an implementation of this interface, you can control
|
provide an implementation of this interface and inject it into the
|
||||||
exactly how the UserDetails object is created. The first parameter is an instance of
|
<classname>LdapAuthenticationProvider</classname>, you have control over exactly how
|
||||||
Spring LDAP's <interfacename>DirContextOperations</interfacename> which gives you
|
the UserDetails object is created. The first parameter is an instance of Spring
|
||||||
access to the LDAP attributes which were loaded. The <literal>username</literal>
|
LDAP's <interfacename>DirContextOperations</interfacename> which gives you access to
|
||||||
parameter is the name used to authenticate and the final parameter is the collection
|
the LDAP attributes which were loaded during authentication. The
|
||||||
of authorities loaded for the user. </para>
|
<literal>username</literal> parameter is the name used to authenticate and the final
|
||||||
|
parameter is the collection of authorities loaded for the user by the configured
|
||||||
|
<interfacename>LdapAuthoritiesPopulator</interfacename>. </para>
|
||||||
<para> The way the context data is loaded varies slightly depending on the type of
|
<para> The way the context data is loaded varies slightly depending on the type of
|
||||||
authentication you are using. With the <classname>BindAuthenticator</classname>,
|
authentication you are using. With the <classname>BindAuthenticator</classname>, the
|
||||||
the context returned from the bind operation will be used to read the attributes,
|
context returned from the bind operation will be used to read the attributes,
|
||||||
otherwise the data will be read using the standard context obtained from the
|
otherwise the data will be read using the standard context obtained from the
|
||||||
configured <interfacename>ContextSource</interfacename> (when a search is configured
|
configured <interfacename>ContextSource</interfacename> (when a search is configured
|
||||||
to locate the user, this will be the data returned by the search object). </para>
|
to locate the user, this will be the data returned by the search object). </para>
|
||||||
|
@ -23,7 +23,8 @@ import org.springframework.ldap.core.DirContextAdapter;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Operations to map a UserDetails object to and from a Spring LDAP <tt>DirContextOperations</tt> implementation.
|
* Operations to map a UserDetails object to and from a Spring LDAP <tt>DirContextOperations</tt> implementation.
|
||||||
* Used by LdapUserDetailsManager when loading and saving/creating user information.
|
* Used by {@code LdapUserDetailsManager} when loading and saving/creating user information, and also by the
|
||||||
|
* {@code LdapAuthenticationProvider} to allow customization of the user data loaded during authentication.
|
||||||
*
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user