registerRouteWithAuth method

void registerRouteWithAuth (
  1. String method,
  2. String route,
  3. Schema schema,
  4. dynamic authorize(
    1. RequestContext req,
    2. ResponseContext res,
    3. dynamic next(
        )
      ),
    4. dynamic action(
      1. RequestContext req,
      2. ResponseContext res
      )
    )

    Registers an action with authorization in this objects REST server (service) by the given method and route.

    • method the HTTP method of the route.
    • route the route to register in this object's REST server (service).
    • schema the schema to use for parameter validation.
    • authorize the authorization interceptor
    • action the action to perform at the given route.