ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsMapper.java
protected GrantedAuthority createAuthority(Object role) {
		if (role instanceof String) {
			if (this.convertToUpperCase) {
				role = ((String) role).toUpperCase();
			}
			return new SimpleGrantedAuthority(this.rolePrefix + role);
		}
		return null;
	}
protected GrantedAuthority createAuthority(Object role) {
		if (role instanceof String) {
			if (this.convertToUpperCase) {
				role = ((String) role).toUpperCase();
			}
			return new SimpleGrantedAuthority(this.rolePrefix + role);
		}
		return null;
	}
Creates a GrantedAuthority from a role attribute. Override to customize authority
object creation.
<p>
The default implementation converts string attributes to roles, making use of the
<tt>rolePrefix</tt> and <tt>convertToUpperCase</tt> properties. Non-String
attributes are ignored.
</p>

@param role the attribute returned from
@return the authority to be added to the list of authorities for the user, or null
if this attribute should be ignored.