pub struct Validator { /* private fields */ }Expand description
A validator for Cloudflare Access JWTs.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn new(team_name: &str, audience: impl Into<String>) -> Self
pub fn new(team_name: &str, audience: impl Into<String>) -> Self
Creates a new Validator with the given Cloudflare Access team name
and application AUD tag.
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, Error>
Creates a new Validator from the current process’s environment
variables.
Sourcepub fn with_client(
client: Client,
team_name: &str,
audience: impl Into<String>,
) -> Self
pub fn with_client( client: Client, team_name: &str, audience: impl Into<String>, ) -> Self
Creates a new Validator that uses a specific reqwest::Client.
Auto Trait Implementations§
impl !Freeze for Validator
impl !RefUnwindSafe for Validator
impl !UnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnsafeUnpin for Validator
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