operation = "Replacing";
break;
}
}
ServerAttribute attr = (ServerAttribute)mod.getAttribute();
if ( attr.instanceOf( SchemaConstants.USER_PASSWORD_AT ) )
{
Object firstValue = attr.get();
String password = null;
if ( firstValue instanceof ServerStringValue )
{
password = ((ServerStringValue)firstValue).getString();
log.debug( "{} Attribute id : 'userPassword', Values : [ '{}' ]", operation, password );
}
else if ( firstValue instanceof ServerBinaryValue )
{
password = ((ServerBinaryValue)firstValue).getString();
if ( log.isDebugEnabled() )
{
StringBuffer sb = new StringBuffer();
sb.append( "'" + password + "' ( " );
sb.append( StringTools.dumpBytes( ((ServerBinaryValue)firstValue).getBytes() ).trim() );
sb.append( " )" );
log.debug( "{} Attribute id : 'userPassword', Values : [ {} ]", operation, sb.toString() );
}
}
subContext.setUserPassword( password );
log.debug( "Got userPassword '{}'.", subContext.getUserPassword() );
}
if ( attr.instanceOf( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT ) )
{
subContext.setPrincipalName( attr.getString() );
log.debug( "Got principal '{}'.", subContext.getPrincipalName() );
}
}
}