pub struct JwtClaimsEngine { /* private fields */ }Expand description
Policy engine backed by verified JWT permission claims.
This is intended as the fast first layer in a composed engine: allow obvious org-wide permissions from the token and delegate resource-specific decisions to RBAC, ODRL, WorkOS FGA, or another precise engine.
Implementations§
Source§impl JwtClaimsEngine
impl JwtClaimsEngine
Sourcepub fn new(subject: VerifiedSubject) -> Self
pub fn new(subject: VerifiedSubject) -> Self
Build an engine from a verified subject.
Sourcepub fn from_permissions(
subject: impl Into<String>,
permissions: impl IntoIterator<Item = String>,
) -> Self
pub fn from_permissions( subject: impl Into<String>, permissions: impl IntoIterator<Item = String>, ) -> Self
Build an engine from raw permission strings.
Trait Implementations§
Source§impl PolicyEngine for JwtClaimsEngine
impl PolicyEngine for JwtClaimsEngine
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 Freeze for JwtClaimsEngine
impl RefUnwindSafe for JwtClaimsEngine
impl Send for JwtClaimsEngine
impl Sync for JwtClaimsEngine
impl Unpin for JwtClaimsEngine
impl UnsafeUnpin for JwtClaimsEngine
impl UnwindSafe for JwtClaimsEngine
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