dropwizard/dropwizard — pull request #541 by bnese (2014-04-15 08:30:26+00:00)
Title: Support for Basic Auth without using @Auth annotation.

Adding support for Basic Authentication and Authorization
```java
@Override
public void initialize(Bootstrap bootstrap) {
final Authenticator authenticator = new Authenticator() {
@Override
public Optional authenticate(BasicCredentials credentials) throws AuthenticationException {
//implement lookup strategy
return Optional.absent();
}
};
final boolean requireAuthorizationHeader = true;
final String realm = "My realm";
final AuthenticationBundle authenticationBundle = new AuthenticationBundle(authenticator, requireAuthorizationHeader, realm);
bootstrap.addBundle(authenticationBundle);
}
```

Annotate resources with @RolesAllowed, @PermitAll or @DenyAll to enforce security.