Defines a route, as defined by its post-compilation path and its method.
Defines a route, as defined by its post-compilation path and its method. If the method is None, the match is purely on the path.
The path pattern is the post-compilation path. For a path with no dynamic parts, this will be the same as what is defined in the routes file. For a path with dynamic parts, this will be different. For example, given the following route.
GET /view/:foo/:bar controllers.Application.view(foo: String, bar: String)
The post-compilation pattern will be the following:
GET /view/$foo<[^/]+>/$bar<[^/]+> controllers.Application.view(foo:String, bar:String)
If you bring up a list of the routes in the running application (just go to an invalid route, like http://localhost:9000/@foo), you can copy and paste the route patterns from here.
the method of the route. See the be.objectify.deadbolt.scala.filters package object for pre-defined methods
the post-compilation path pattern.
the constraint to apply to the route.
the handler to use for the request. If None, the default handler (as defined by HandlerCache.apply() will be used.
2.5.1
Holds the authorized route definitions, and attempts to find one based on the method (if defined) and path, or just the path if the route's method is None.
Holds the authorized route definitions, and attempts to find one based on the method (if defined) and path, or just the path if the route's method is None.
Extend this class and implement the routes function with a Seq of authorization rules, e.g.
val routes: Seq[AuthorizedRoute] = Seq(AuthorizedRoute(Get, "/view/$foo<[^/]+>/$bar<[^/]+>", filterConstraints.subjectPresent), AuthorizedRoute(Any, "/profile", filterConstraints.dynamic("ruleName")))
If you're using runtime dependency injection, you will also need to create a binding for your extended class, e.g.
bind[AuthorizedRoutes].to[MyAuthorizedRoutes]
2.5.1
Individual components of Deadbolt's filter support.
Individual components of Deadbolt's filter support. Use this trait if your application uses compile-time dependency injection.
2.5.1
Filters all incoming HTTP requests and applies constraints based on the route's comment.
Filters all incoming HTTP requests and applies constraints based on the route's comment. If a comment is present, the constraint for that route will be applied. If access is allowed, the next filter in the chain is invoked; if access is not allowed, be.objectify.deadbolt.scala.DeadboltHandler.onAuthFailure() is invoked.
The format of the comment is deadbolt:constraintType:config. Individual configurations have the form :label[value] - to omit an optional config, remove :label[value],
Restrict is a tricky one, because the possible combinations of roles leads to a nightmare to parse. Instead, define your role constraints within the composite cache and use the named constraint instead. deadbolt:restrict is actually a synonym for deadbolt:composite.
2.5.1
Bindings for run-time dependency injection.
Bindings for run-time dependency injection. Enable this module in your application.conf to get access to the route comment filter components.
2.5.1
Filters all incoming HTTP requests and matches the method and/or path (depending on the AuthorizedRoute definition).
Filters all incoming HTTP requests and matches the method and/or path (depending on the AuthorizedRoute definition). If a match is found, the constraint for that route will be applied. If access is allowed, the next filter in the chain is invoked; if access is not allowed, be.objectify.deadbolt.scala.DeadboltHandler.onAuthFailure() is invoked.
2.5.1
Bindings for run-time dependency injection.
Bindings for run-time dependency injection. Enable this module in your application.conf to get access to the route path filter components.
2.5.1
Provides helpers for creating filter-based constraints.
Provides helpers for creating filter-based constraints.
2.5.1
Implementations are used to represent Deadbolt constraints.
Implementations are used to represent Deadbolt constraints. See FilterConstraints for implementations of all of Deadbolt's constraint types.
2.5.1