This post will guide you through setting up an a new Dropwizard project and securing it with OAuth!
Hi, Thanks for the detailed steps. I have a problem in the final though, when accessing the localhost:8080, I got the okta widget to authenticate but the user credentials are not accepted (there is actually no error, but there is nothing happening either). I’m thinking the okta configuration should be different maybe. At the end of okta application registration I got a link that can be used for test. This is redirecting me to localhost:8080/login and the answer is there is no resource defined for /login
Can you look in your developer console and see if there’s any error messages in there? You might also try viewing the code for the example created in this post.
Excellent information. Thanks! Looking forward how to automate registration
There is a small typo. The path for
HomePageResource must be
/. Otherwise an error happens. Your example in Git works fine but if someone follows these instructions, they will see an error and a logout button.
How is the OktaOAuthConfig class supposed to read the config.yml file? In DemoApplication, the widgetConfig’s parameters are all null. So i get
java.lang.IllegalStateException: Failed to configure JwtVerifier when starting up the dropwizard server.
Try the the example project from GitHub: https://github.com/oktadeve…
It’s possible we need to make some updates to work with the latest versions of Dropwizard. (let us know what version you are using)
The idea though is Dropwizard handles the config parsing for you and sets the values in the config object: https://github.com/oktadeve…
Keep us posted!