Trait YAuthPlugin
Source pub trait YAuthPlugin:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn public_routes(
&self,
ctx: &PluginContext<'_>,
) -> Option<Router<YAuthState>>;
fn protected_routes(
&self,
ctx: &PluginContext<'_>,
) -> Option<Router<YAuthState>>;
// Provided methods
fn on_event(
&self,
_event: &AuthEvent,
_ctx: &PluginContext<'_>,
) -> EventResponse { ... }
fn schema(&self) -> Vec<TableDef> { ... }
}
Declare the tables this plugin needs. Default: empty (no tables).