pub struct ScopeAuthorizer { /* private fields */ }Expand description
Coarse ADK scope gate. The runtime policy engine still evaluates the exact action.
Implementations§
Source§impl ScopeAuthorizer
impl ScopeAuthorizer
Sourcepub fn new(scopes: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn new(scopes: impl IntoIterator<Item = impl Into<String>>) -> Self
Construct a scope gate from verified JWT/OIDC request scopes.
Sourcepub fn from_verified_identity(
principal_id: impl Into<String>,
tenant_id: Option<String>,
scopes: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn from_verified_identity( principal_id: impl Into<String>, tenant_id: Option<String>, scopes: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Construct from identity already verified by adk-auth JWT/OIDC middleware.
Sourcepub fn verified_tenant_id(&self) -> Option<&str>
pub fn verified_tenant_id(&self) -> Option<&str>
Tenant identity already verified by adk-auth middleware. Graph/model state is never consulted for this value.
Verify coarse entitlement without treating it as runtime action approval.
§Errors
Returns AuthorizationError::PrincipalMismatch or
AuthorizationError::TenantMismatch when the context identity differs
from the verified identity, or AuthorizationError::MissingScope when
the required computer:* scope for the requested mode is absent.
Trait Implementations§
Source§impl Clone for ScopeAuthorizer
impl Clone for ScopeAuthorizer
Source§fn clone(&self) -> ScopeAuthorizer
fn clone(&self) -> ScopeAuthorizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScopeAuthorizer
impl Debug for ScopeAuthorizer
Source§impl Default for ScopeAuthorizer
impl Default for ScopeAuthorizer
Source§fn default() -> ScopeAuthorizer
fn default() -> ScopeAuthorizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScopeAuthorizer
impl RefUnwindSafe for ScopeAuthorizer
impl Send for ScopeAuthorizer
impl Sync for ScopeAuthorizer
impl Unpin for ScopeAuthorizer
impl UnsafeUnpin for ScopeAuthorizer
impl UnwindSafe for ScopeAuthorizer
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