pub struct AuthenticationScopePolicy<'a> { /* private fields */ }Expand description
Complete provider or operation-owned authentication-scope policy.
Implementations§
Source§impl<'a> AuthenticationScopePolicy<'a>
impl<'a> AuthenticationScopePolicy<'a>
Sourcepub const fn new(
provider: ScopeRequirement<ProviderId>,
service: ScopeRequirement<ServiceId>,
endpoint: ScopeRequirement<EndpointIdentity<'a>>,
audience: ScopeRequirement<ScopeValue<'a>>,
account: ScopeRequirement<ScopeValue<'a>>,
tenant: ScopeRequirement<ScopeValue<'a>>,
) -> Self
pub const fn new( provider: ScopeRequirement<ProviderId>, service: ScopeRequirement<ServiceId>, endpoint: ScopeRequirement<EndpointIdentity<'a>>, audience: ScopeRequirement<ScopeValue<'a>>, account: ScopeRequirement<ScopeValue<'a>>, tenant: ScopeRequirement<ScopeValue<'a>>, ) -> Self
Creates a policy with an explicit rule for every scope field.
Sourcepub const fn provider_requirement(self) -> ScopeRequirement<ProviderId>
pub const fn provider_requirement(self) -> ScopeRequirement<ProviderId>
Returns the provider rule for adapter identity verification.
Sourcepub const fn service_requirement(self) -> ScopeRequirement<ServiceId>
pub const fn service_requirement(self) -> ScopeRequirement<ServiceId>
Returns the service rule for adapter identity verification.
Sourcepub const fn endpoint_requirement(
self,
) -> ScopeRequirement<EndpointIdentity<'a>>
pub const fn endpoint_requirement( self, ) -> ScopeRequirement<EndpointIdentity<'a>>
Returns the endpoint rule for adapter destination verification.
Sourcepub const fn audience_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
pub const fn audience_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
Returns the audience rule for adapter identity verification.
Sourcepub const fn account_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
pub const fn account_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
Returns the account rule for adapter identity verification.
Sourcepub const fn tenant_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
pub const fn tenant_requirement(self) -> ScopeRequirement<ScopeValue<'a>>
Returns the tenant rule for adapter identity verification.
Sourcepub fn validate(
self,
scope: AuthenticationScope<'a>,
) -> Result<(), AuthenticationScopeError>
pub fn validate( self, scope: AuthenticationScope<'a>, ) -> Result<(), AuthenticationScopeError>
Validates one credential scope before authorization-header construction.
Trait Implementations§
Source§impl<'a> Clone for AuthenticationScopePolicy<'a>
impl<'a> Clone for AuthenticationScopePolicy<'a>
Source§fn clone(&self) -> AuthenticationScopePolicy<'a>
fn clone(&self) -> AuthenticationScopePolicy<'a>
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 moreimpl<'a> Copy for AuthenticationScopePolicy<'a>
Source§impl<'a> Debug for AuthenticationScopePolicy<'a>
impl<'a> Debug for AuthenticationScopePolicy<'a>
impl<'a> Eq for AuthenticationScopePolicy<'a>
Source§impl<'a> PartialEq for AuthenticationScopePolicy<'a>
impl<'a> PartialEq for AuthenticationScopePolicy<'a>
impl<'a> StructuralPartialEq for AuthenticationScopePolicy<'a>
Auto Trait Implementations§
impl<'a> Freeze for AuthenticationScopePolicy<'a>
impl<'a> RefUnwindSafe for AuthenticationScopePolicy<'a>
impl<'a> Send for AuthenticationScopePolicy<'a>
impl<'a> Sync for AuthenticationScopePolicy<'a>
impl<'a> Unpin for AuthenticationScopePolicy<'a>
impl<'a> UnsafeUnpin for AuthenticationScopePolicy<'a>
impl<'a> UnwindSafe for AuthenticationScopePolicy<'a>
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