final Credentials anonCredentials = running.anonymousCredentials();
final Map<String, Object> attributes = new HashMap<String, Object>();
// Try to authenticate with the provider(s) ...
ExecutionContext context = running.context();
ExecutionContext sessionContext = authenticators.authenticate(credentials, repoName, workspaceName, context, attributes);
if (sessionContext == null && credentials != null && anonCredentials != null) {
// Failed non-anonymous authentication, so try anonymous authentication ...
if (logger.isDebugEnabled()) logger.debug(JcrI18n.usingAnonymousUser.text());
attributes.clear();