private AuthenticationScheme getAuthenticationScheme( final Map<String, String> options ) {
final String authScheme = options.get( AUTH_SCHEME_KEY );
AuthenticationScheme scheme = null;
if ( authScheme == null || authScheme.isEmpty() ) {
return new FormAuthenticationScheme();
} else {
scheme = loadConfigClazz( authScheme, AuthenticationScheme.class );
}
if ( scheme == null && authScheme.equalsIgnoreCase( FORM ) ) {
return new FormAuthenticationScheme();
}
return scheme;
}