[−][src]Trait qonfucius_sso_utility::AuthorizeScope
Utility Trait to handle ACL from a type to an other through a custom Scope
Associated Types
type ScopedResource
[src]
Your custom scoped resource type
type Action
[src]
Your custom action type, usally an enum with variants like Write
, Access
etc.
Required methods
pub fn is_authorized(
&self,
authorized_scopes: Scope<Self::ScopedResource>,
action: &Self::Action,
target: Option<&T>
) -> bool where
Self::ScopedResource: Hash + Eq + Debug + Clone,
[src]
&self,
authorized_scopes: Scope<Self::ScopedResource>,
action: &Self::Action,
target: Option<&T>
) -> bool where
Self::ScopedResource: Hash + Eq + Debug + Clone,
Is the action
authorized for Self
on target
Provided methods
pub fn authorize_action(
&self,
authorized_scopes: Scope<Self::ScopedResource>,
action: Self::Action,
target: Option<&T>
) -> Result<(), UtilityError> where
Self::ScopedResource: Hash + Eq + Debug + Clone,
Self::Action: Display,
[src]
&self,
authorized_scopes: Scope<Self::ScopedResource>,
action: Self::Action,
target: Option<&T>
) -> Result<(), UtilityError> where
Self::ScopedResource: Hash + Eq + Debug + Clone,
Self::Action: Display,
Authorizes action
for Self
on target
or returns an error.