pub struct OAuth2ResourceServerBuilder<Claims>{ /* private fields */ }
Implementations§
Source§impl<Claims> OAuth2ResourceServerBuilder<Claims>
impl<Claims> OAuth2ResourceServerBuilder<Claims>
Sourcepub fn add_tenant(self, tenant_configuration: TenantConfiguration) -> Self
pub fn add_tenant(self, tenant_configuration: TenantConfiguration) -> Self
Add a tenant (authorization server).
Sourcepub fn auth_resolver(
self,
auth_resolver: Arc<dyn AuthorizerResolver<Claims>>,
) -> Self
pub fn auth_resolver( self, auth_resolver: Arc<dyn AuthorizerResolver<Claims>>, ) -> Self
Provide a custom authorization resolver.
Only needs to be provided if the default resolver is not sufficient.
See AuthorizerResolver for more information.
Sourcepub async fn build(self) -> Result<OAuth2ResourceServer<Claims>, StartupError>
pub async fn build(self) -> Result<OAuth2ResourceServer<Claims>, StartupError>
Construct an OAuth2ResourceServer.
During construction the OIDC Provider Configuration endpoint of the authorization server might be queried. Thus, the operation can fail and therefore returns a Result.
Trait Implementations§
Source§impl<Claims> Debug for OAuth2ResourceServerBuilder<Claims>
impl<Claims> Debug for OAuth2ResourceServerBuilder<Claims>
Auto Trait Implementations§
impl<Claims> Freeze for OAuth2ResourceServerBuilder<Claims>
impl<Claims> !RefUnwindSafe for OAuth2ResourceServerBuilder<Claims>
impl<Claims> Send for OAuth2ResourceServerBuilder<Claims>
impl<Claims> Sync for OAuth2ResourceServerBuilder<Claims>
impl<Claims> Unpin for OAuth2ResourceServerBuilder<Claims>where
Claims: Unpin,
impl<Claims> !UnwindSafe for OAuth2ResourceServerBuilder<Claims>
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