pub struct OAuth2Server { /* private fields */ }
Expand description
OAuth 2.0 Server with integrated client registry
Implementations§
Source§impl OAuth2Server
impl OAuth2Server
Sourcepub async fn new(storage: Arc<dyn AuthStorage>) -> Result<Self>
pub async fn new(storage: Arc<dyn AuthStorage>) -> Result<Self>
Create a new OAuth 2.0 server
Sourcepub async fn new_with_config(
storage: Arc<dyn AuthStorage>,
config: OAuth2ServerConfig,
) -> Result<Self>
pub async fn new_with_config( storage: Arc<dyn AuthStorage>, config: OAuth2ServerConfig, ) -> Result<Self>
Create a new OAuth 2.0 server with custom configuration
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.0 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 server configuration for discovery
Trait Implementations§
Source§impl Clone for OAuth2Server
impl Clone for OAuth2Server
Source§fn clone(&self) -> OAuth2Server
fn clone(&self) -> OAuth2Server
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 OAuth2Server
impl !RefUnwindSafe for OAuth2Server
impl Send for OAuth2Server
impl Sync for OAuth2Server
impl Unpin for OAuth2Server
impl !UnwindSafe for OAuth2Server
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