pub struct ArcadeToolAuthEngine { /* private fields */ }Expand description
Policy engine that checks whether a user has authorized an external tool.
The engine maps Typesec resource ids to Arcade tool names. A resource id may
either be present in the explicit mapping or already look like an Arcade tool
name such as Gmail.ListEmails.
Implementations§
Trait Implementations§
Source§impl PolicyEngine for ArcadeToolAuthEngine
impl PolicyEngine for ArcadeToolAuthEngine
Source§fn check(
&self,
subject: &SubjectId,
action: &str,
resource: &ResourceId,
) -> PolicyResult
fn check( &self, subject: &SubjectId, action: &str, resource: &ResourceId, ) -> PolicyResult
Source§fn check_async<'a>(
&'a self,
subject: &'a SubjectId,
action: &'a str,
resource: &'a ResourceId,
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
fn check_async<'a>( &'a self, subject: &'a SubjectId, action: &'a str, resource: &'a ResourceId, ) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
Source§fn check_with_context(
&self,
subject: &SubjectId,
action: &str,
resource: &ResourceId,
_ctx: &RequestContext,
) -> PolicyResult
fn check_with_context( &self, subject: &SubjectId, action: &str, resource: &ResourceId, _ctx: &RequestContext, ) -> PolicyResult
Evaluate a request with runtime context. Read more
Source§fn check_with_context_async<'a>(
&'a self,
subject: &'a SubjectId,
action: &'a str,
resource: &'a ResourceId,
ctx: &'a RequestContext,
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
fn check_with_context_async<'a>( &'a self, subject: &'a SubjectId, action: &'a str, resource: &'a ResourceId, ctx: &'a RequestContext, ) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
Evaluate a request with runtime context asynchronously. Read more
Source§fn with_fallback(self, fallback: Arc<dyn PolicyEngine>) -> FallbackEngine<Self>where
Self: Sized,
fn with_fallback(self, fallback: Arc<dyn PolicyEngine>) -> FallbackEngine<Self>where
Self: Sized,
Compose this engine with a fallback. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ArcadeToolAuthEngine
impl !UnwindSafe for ArcadeToolAuthEngine
impl Freeze for ArcadeToolAuthEngine
impl Send for ArcadeToolAuthEngine
impl Sync for ArcadeToolAuthEngine
impl Unpin for ArcadeToolAuthEngine
impl UnsafeUnpin for ArcadeToolAuthEngine
Blanket Implementations§
Source§impl<T> AsyncPolicyEngine for Twhere
T: PolicyEngine + ?Sized,
impl<T> AsyncPolicyEngine for Twhere
T: PolicyEngine + ?Sized,
Source§fn check_async<'a>(
&'a self,
subject: &'a SubjectId,
action: &'a str,
resource: &'a ResourceId,
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
fn check_async<'a>( &'a self, subject: &'a SubjectId, action: &'a str, resource: &'a ResourceId, ) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
Evaluate whether
subject may perform action on resource
asynchronously.Source§fn check_with_context_async<'a>(
&'a self,
subject: &'a SubjectId,
action: &'a str,
resource: &'a ResourceId,
ctx: &'a RequestContext,
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
fn check_with_context_async<'a>( &'a self, subject: &'a SubjectId, action: &'a str, resource: &'a ResourceId, ctx: &'a RequestContext, ) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'a>>
Evaluate a request with runtime context asynchronously.
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