pub struct OAuth21Server { /* private fields */ }Expand description
OAuth 2.1 Authorization Server
This server implements OAuth 2.1 security best practices and requirements, providing enhanced security over OAuth 2.0.
Implementations§
Source§impl OAuth21Server
impl OAuth21Server
Sourcepub async fn new(
security_config: Option<OAuth21SecurityConfig>,
storage: Arc<dyn AuthStorage>,
) -> Result<Self>
pub async fn new( security_config: Option<OAuth21SecurityConfig>, storage: Arc<dyn AuthStorage>, ) -> Result<Self>
Create a new OAuth 2.1 server
Sourcepub async fn register_client(
&self,
config: ClientConfig,
) -> Result<ClientConfig>
pub async fn register_client( &self, config: ClientConfig, ) -> Result<ClientConfig>
Register a new OAuth 2.1 compliant client
Sourcepub async fn get_client(&self, client_id: &str) -> Result<Option<ClientConfig>>
pub async fn get_client(&self, client_id: &str) -> Result<Option<ClientConfig>>
Get a client by ID
Sourcepub async fn update_client(
&self,
client_id: &str,
config: ClientConfig,
) -> Result<()>
pub async fn update_client( &self, client_id: &str, config: ClientConfig, ) -> Result<()>
Update a client configuration
Sourcepub async fn delete_client(&self, client_id: &str) -> Result<()>
pub async fn delete_client(&self, client_id: &str) -> Result<()>
Delete a client
Sourcepub async fn get_server_configuration(&self) -> Result<Value>
pub async fn get_server_configuration(&self) -> Result<Value>
Get OAuth 2.1 server configuration
Sourcepub fn get_security_config(&self) -> &OAuth21SecurityConfig
pub fn get_security_config(&self) -> &OAuth21SecurityConfig
Get security configuration
Sourcepub fn update_security_config(&mut self, config: OAuth21SecurityConfig)
pub fn update_security_config(&mut self, config: OAuth21SecurityConfig)
Update security configuration
Trait Implementations§
Source§impl Clone for OAuth21Server
impl Clone for OAuth21Server
Source§fn clone(&self) -> OAuth21Server
fn clone(&self) -> OAuth21Server
Returns a duplicate 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 OAuth21Server
impl !RefUnwindSafe for OAuth21Server
impl Send for OAuth21Server
impl Sync for OAuth21Server
impl Unpin for OAuth21Server
impl !UnwindSafe for OAuth21Server
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more