pub struct ClientRegistry { /* private fields */ }Expand description
Client Registry for managing OAuth 2.0 clients
Implementations§
Source§impl ClientRegistry
impl ClientRegistry
Sourcepub async fn new(storage: Arc<dyn AuthStorage>) -> Result<Self>
pub async fn new(storage: Arc<dyn AuthStorage>) -> Result<Self>
Create a new client registry
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>>
Retrieve 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 validate_redirect_uri(
&self,
client_id: &str,
redirect_uri: &str,
) -> Result<bool>
pub async fn validate_redirect_uri( &self, client_id: &str, redirect_uri: &str, ) -> Result<bool>
Validate that a redirect URI is authorized for a client
Sourcepub async fn validate_scope(&self, client_id: &str, scope: &str) -> Result<bool>
pub async fn validate_scope(&self, client_id: &str, scope: &str) -> Result<bool>
Validate that a scope is authorized for a client
Trait Implementations§
Source§impl Clone for ClientRegistry
impl Clone for ClientRegistry
Source§fn clone(&self) -> ClientRegistry
fn clone(&self) -> ClientRegistry
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 ClientRegistry
impl !RefUnwindSafe for ClientRegistry
impl Send for ClientRegistry
impl Sync for ClientRegistry
impl Unpin for ClientRegistry
impl !UnwindSafe for ClientRegistry
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