Created
February 10, 2015 03:59
-
-
Save javaeeeee/0598c0212d046dd1177f to your computer and use it in GitHub Desktop.
Register Dropwizard Authenticator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void run(final DWGettingStartedConfiguration configuration, | |
| final Environment environment) { | |
| environment.jersey().register(AuthFactory.binder( | |
| new BasicAuthFactory<>( | |
| new GreetingAuthenticator(configuration.getLogin(), | |
| configuration.getPassword()), | |
| "SECURITY REALM", | |
| User.class))); | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment