Struct oxide_auth::code_grant::backend::GuardRef
[−]
[src]
pub struct GuardRef<'a> { /* fields omitted */ }
Guard is a thin wrapper holding by reference all necessary parameters for guarding a resource.
Methods
impl<'a> GuardRef<'a>
[src]
fn protect(&self, req: &GuardRequest) -> Result<(), AccessError>
[src]
The result will indicate whether the resource access should be allowed or not.
fn with<S: ?Sized>(issuer: &'a mut Issuer, scopes: &'a S) -> Self where
S: AsRef<[Scope]>,
[src]
S: AsRef<[Scope]>,
Construct a guard from an issuer backend and a choice of scopes. A grant need only have ONE of the scopes to access the resource but each scope can require multiple subscopes.