@@ -0,0 +1,916 @@
+package com.yammer.dropwizard.authenticator.resources;%0A%0Aimport com.google.common.base.Optional;%0Aimport com.yammer.dropwizard.auth.AuthenticationException;%0Aimport com.yammer.dropwizard.auth.Authenticator;%0Aimport com.yammer.dropwizard.auth.basic.BasicCredentials;%0Aimport com.yammer.dropwizard.authenticator.LdapAuthenticator;%0A%0Apublic class ResourceAuthenticator implements Authenticator%3CBasicCredentials, BasicCredentials%3E %7B%0A%0A    private final LdapAuthenticator ldapAuthenticator;%0A%0A    public ResourceAuthenticator(LdapAuthenticator ldapAuthenticator) %7B%0A        this.ldapAuthenticator = ldapAuthenticator;%0A    %7D%0A%0A    @Override%0A    public Optional%3CBasicCredentials%3E authenticate(BasicCredentials credentials) throws AuthenticationException %7B%0A        if (ldapAuthenticator.authenticate(credentials)) %7B%0A            return Optional.of(credentials);%0A        %7D else %7B%0A            return Optional.absent();%0A        %7D%0A    %7D%0A%7D%0A

Move ResourceAuthenticator to here from Clank