pub struct TenantStaticConfigurationBuilder { /* private fields */ }Implementations§
Source§impl TenantStaticConfigurationBuilder
impl TenantStaticConfigurationBuilder
Sourcepub fn identifier(self, identifier: &str) -> Self
pub fn identifier(self, identifier: &str) -> Self
Set an identifier for the tenant.
Can be accessed on a Authorizer in order to identify what authorization server the authorizer is configured for.
Used to validate the the iss
Defaults to static.
Sourcepub fn audiences(self, audiences: &[impl ToString]) -> Self
pub fn audiences(self, audiences: &[impl ToString]) -> Self
Set the expected audiences.
Used to validate aud claim of JWTs.
Sourcepub fn claims_validation(self, claims_validation: ClaimsValidationSpec) -> Self
pub fn claims_validation(self, claims_validation: ClaimsValidationSpec) -> Self
Set what claims of JWTs to validate.
By default, iss, exp, aud and possibly nbf will be validated.
Sourcepub fn build(self) -> Result<TenantConfiguration, StartupError>
pub fn build(self) -> Result<TenantConfiguration, StartupError>
Construct a TenantConfiguration.
Auto Trait Implementations§
impl Freeze for TenantStaticConfigurationBuilder
impl RefUnwindSafe for TenantStaticConfigurationBuilder
impl Send for TenantStaticConfigurationBuilder
impl Sync for TenantStaticConfigurationBuilder
impl Unpin for TenantStaticConfigurationBuilder
impl UnwindSafe for TenantStaticConfigurationBuilder
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