*/
if ( "simple".equalsIgnoreCase( authentication ) )
{
if ( credential == null )
{
throw new LdapConfigurationException( "missing required "
+ Context.SECURITY_CREDENTIALS + " property for simple authentication" );
}
if ( principal == null )
{
throw new LdapConfigurationException( "missing required "
+ Context.SECURITY_PRINCIPAL + " property for simple authentication" );
}
}
/*
* If bind is none make sure credentials and the principal
* name are NOT set within the environment, otherwise complain
*/
else if ( "none".equalsIgnoreCase( authentication ) )
{
if ( credential != null )
{
throw new LdapConfigurationException( "ambiguous bind "
+ "settings encountered where bind is anonymous yet "
+ Context.SECURITY_CREDENTIALS + " property is set" );
}
if ( principal != null )
{
throw new LdapConfigurationException( "ambiguous bind "
+ "settings encountered where bind is anonymous yet "
+ Context.SECURITY_PRINCIPAL + " property is set" );
}
if( !startupConfiguration.isAllowAnonymousAccess() )