pub enum AuthMethod {
Providers,
Login {
flow: LoginFlow,
},
Signup {
via: Option<String>,
},
Whoami,
Logout,
Requires {
method: String,
},
Roles,
RoleSet {
role: String,
grants: Vec<String>,
},
Grant {
principal: String,
role: String,
scope: String,
},
Revoke {
principal: String,
role: Option<String>,
scope: String,
},
Waiting,
}Expand description
Auto-generated method enum for schema extraction
Variants§
Providers
The ways in this server offers
Login
Sign in — a person through the browser, an agent with its key
Signup
Create an account, or ask for access
Whoami
Who you are: principal, roles held where, ceiling
Logout
Sign out: end this session
Requires
What a method needs: its grant, target, and the roles that list it
Roles
Every role and the grants it lists
RoleSet
Set a role’s grants (admin on *)
Grant
Give a principal a role on a scope
Revoke
Take a principal’s role on a scope away
Waiting
Who asked for access and holds nothing yet (admin on *)
Implementations§
Source§impl AuthMethod
impl AuthMethod
pub fn all_method_names() -> &'static [&'static str]
Source§impl AuthMethod
impl AuthMethod
Sourcepub fn method_schemas() -> Vec<MethodSchema>
pub fn method_schemas() -> Vec<MethodSchema>
Get per-method schema info including params, return types, and content hashes
Note: This method has O(1) schema lookup cost after first call due to caching.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§impl Debug for AuthMethod
impl Debug for AuthMethod
Source§impl<'de> Deserialize<'de> for AuthMethod
impl<'de> Deserialize<'de> for AuthMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for AuthMethod
impl JsonSchema for AuthMethod
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl MethodEnumSchema for AuthMethod
impl MethodEnumSchema for AuthMethod
Source§fn method_names() -> &'static [&'static str]
fn method_names() -> &'static [&'static str]
Get all method names as static strings
Source§fn schema_with_consts() -> Value
fn schema_with_consts() -> Value
Generate schema with const values for method discriminators Read more
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnsafeUnpin for AuthMethod
impl UnwindSafe for AuthMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more