pub trait Authenticatable:
Send
+ Sync
+ 'static {
// Required methods
fn auth_identifier(&self) -> i64;
fn as_any(&self) -> &dyn Any;
// Provided method
fn auth_identifier_name(&self) -> &'static str { ... }
}Expand description
Required Methods§
Sourcefn auth_identifier(&self) -> i64
fn auth_identifier(&self) -> i64
Get the unique identifier for the user (typically the primary key)
Provided Methods§
Sourcefn auth_identifier_name(&self) -> &'static str
fn auth_identifier_name(&self) -> &'static str
Get the name of the identifier column (e.g., “id”)
Override this if your user model uses a different column name.