pub struct MetadataProvider { /* private fields */ }Expand description
Authorization Server Metadata Provider
Implementations§
Source§impl MetadataProvider
impl MetadataProvider
Sourcepub fn new(metadata: AuthorizationServerMetadata) -> Self
pub fn new(metadata: AuthorizationServerMetadata) -> Self
Create a new metadata provider
Sourcepub fn from_oauth2_server(
_server: &OAuth2Server,
base_url: &str,
) -> Result<Self>
pub fn from_oauth2_server( _server: &OAuth2Server, base_url: &str, ) -> Result<Self>
Create metadata from OAuth 2.0 server configuration
Sourcepub fn from_oauth21_server(
_server: &OAuth2Server,
base_url: &str,
) -> Result<Self>
pub fn from_oauth21_server( _server: &OAuth2Server, base_url: &str, ) -> Result<Self>
Create metadata from OAuth 2.1 server configuration
Sourcepub fn get_metadata(&self) -> &AuthorizationServerMetadata
pub fn get_metadata(&self) -> &AuthorizationServerMetadata
Get the authorization server metadata
Sourcepub fn get_metadata_json(&self) -> Result<String>
pub fn get_metadata_json(&self) -> Result<String>
Get metadata as JSON
Sourcepub fn update_metadata<F>(&mut self, updater: F) -> Result<()>where
F: FnOnce(&mut AuthorizationServerMetadata),
pub fn update_metadata<F>(&mut self, updater: F) -> Result<()>where
F: FnOnce(&mut AuthorizationServerMetadata),
Update metadata field
Auto Trait Implementations§
impl Freeze for MetadataProvider
impl RefUnwindSafe for MetadataProvider
impl Send for MetadataProvider
impl Sync for MetadataProvider
impl Unpin for MetadataProvider
impl UnwindSafe for MetadataProvider
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> 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