pub struct CatValidationOptions {
pub issuer: String,
pub audience: Option<Vec<String>>,
}Expand description
Options for validating a CAT token.
This struct contains parameters that control how token validation is performed, including which issuers and audiences are considered valid.
§Examples
use common_access_token::CatValidationOptions;
// Basic validation requiring a specific issuer
let options = CatValidationOptions {
issuer: "trusted-issuer".to_string(),
audience: None, // Don't validate audience
};
// Validation with audience restriction
let options_with_audience = CatValidationOptions {
issuer: "trusted-issuer".to_string(),
audience: Some(vec!["app-1".to_string(), "app-2".to_string()]),
};Fields§
§issuer: StringExpected issuer of token. The token will be rejected if it doesn’t match this value.
audience: Option<Vec<String>>Allowed audiences for token. If provided, the token must contain at least one of these audiences to be considered valid. If None, audience validation is skipped.
Trait Implementations§
Source§impl Clone for CatValidationOptions
impl Clone for CatValidationOptions
Source§fn clone(&self) -> CatValidationOptions
fn clone(&self) -> CatValidationOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CatValidationOptions
impl RefUnwindSafe for CatValidationOptions
impl Send for CatValidationOptions
impl Sync for CatValidationOptions
impl Unpin for CatValidationOptions
impl UnwindSafe for CatValidationOptions
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