pub enum AuthActivationMethod {
Providers,
Login {
flow: LoginFlow,
},
Signup {
via: Option<ProviderName>,
},
Whoami,
Logout,
Requires {
method: MethodPath,
},
Roles,
RoleSet {
role: RoleName,
grants: Vec<GrantName>,
},
Grant {
principal: Principal,
role: RoleName,
scope: ScopeName,
},
Revoke {
principal: Principal,
role: Option<RoleName>,
scope: ScopeName,
},
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
Fields
§
via: Option<ProviderName>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
Fields
§
method: MethodPathRoles
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 AuthActivationMethod
impl AuthActivationMethod
pub fn all_method_names() -> &'static [&'static str]
Source§impl AuthActivationMethod
impl AuthActivationMethod
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 AuthActivationMethod
impl Clone for AuthActivationMethod
Source§impl Debug for AuthActivationMethod
impl Debug for AuthActivationMethod
Source§impl<'de> Deserialize<'de> for AuthActivationMethod
impl<'de> Deserialize<'de> for AuthActivationMethod
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 AuthActivationMethod
impl JsonSchema for AuthActivationMethod
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 AuthActivationMethod
impl MethodEnumSchema for AuthActivationMethod
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 AuthActivationMethod
impl RefUnwindSafe for AuthActivationMethod
impl Send for AuthActivationMethod
impl Sync for AuthActivationMethod
impl Unpin for AuthActivationMethod
impl UnsafeUnpin for AuthActivationMethod
impl UnwindSafe for AuthActivationMethod
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