Trait AuthenticatedUser

Source
pub trait AuthenticatedUser {
    // Required method
    fn id(&self) -> String;

    // Provided methods
    fn roles(&self) -> Vec<String> { ... }
    fn permissions(&self) -> Vec<String> { ... }
}
Expand description

Trait for users that can be authenticated in tests

Required Methods§

Source

fn id(&self) -> String

Get the user ID for authentication

Provided Methods§

Source

fn roles(&self) -> Vec<String>

Get user roles for RBAC testing

Source

fn permissions(&self) -> Vec<String>

Get user permissions for testing

Implementors§