Helidon WebServer Security Support.

Example of integration (expects an instance of Security):

 // WebServer routing builder - this is our integration point
 HttpRouting routing = HttpRouting.builder()
 // register the WebSecurity to create context (shared by all routes)
 // authenticate all paths under /user and require role "user"
 .get("/user[/{*}]", WebSecurity.authenticate()
 // authenticate "/admin" path and require role "admin"
 .get("/admin", WebSecurity.rolesAllowed("admin")
 // build a routing instance to start WebServer with.

The main security methods are duplicate - first as static methods on SecurityHttpFeature and then as instance methods on SecurityHandler that is returned by the static methods above. This is to provide a single starting point for security integration (SecurityHttpFeature) and fluent API to build the "gate" to each route that is protected.

See Also: