macro_rules! impl_auth_plugin {
(@pat get) => { ... };
(@pat post) => { ... };
(@pat put) => { ... };
(@pat delete) => { ... };
(@pat patch) => { ... };
(@pat head) => { ... };
(@route get) => { ... };
(@route post) => { ... };
(@route put) => { ... };
(@route delete) => { ... };
(
$plugin:ty, $name:expr;
routes {
$( $method:ident $path:literal => $handler:ident, $op_id:literal );* $(;)?
}
$( extra { $($extra:tt)* } )?
) => { ... };
}Expand description
Generates the AuthPlugin<DB> impl for a plugin with static route dispatch.
Eliminates the dual declaration of routes in routes() and on_request()
by generating both from a single route table.
§Exceptions (must keep manual impl)
OAuthPlugin— dynamic path matching for/callback/{provider}SessionManagementPlugin— match guards and OR patternsEmailPasswordPlugin— conditional routes based on configUserManagementPlugin— conditional routes based on configPasswordManagementPlugin— dynamic path matching for/reset-password/{token}OrganizationPlugin— handlers accept extra&self.configargument