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 allowed_algorithms(self, algorithms: &[Algorithm]) -> Self
pub fn allowed_algorithms(self, algorithms: &[Algorithm]) -> Self
Set the allowed algorithms for JWT validation.
By default, all standard asymmetric algorithms are allowed (RS256, RS384, RS512, ES256, ES384, PS256, PS384, PS512, EdDSA). HMAC algorithms are excluded by default.
Use this method to restrict the allowed algorithms if your authorization server only uses specific algorithms.
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