#[non_exhaustive]pub struct OidcConfig { /* private fields */ }Expand description
OIDC client-credentials configuration for a token endpoint.
Construct with OidcConfig::new; #[non_exhaustive] so fields can be
added without a breaking change.
Implementations§
Source§impl OidcConfig
impl OidcConfig
Sourcepub fn new(
token_url: impl Into<String>,
client_id: impl Into<String>,
client_secret: impl Into<String>,
) -> Self
pub fn new( token_url: impl Into<String>, client_id: impl Into<String>, client_secret: impl Into<String>, ) -> Self
Create a client-credentials configuration (no scope).
Sourcepub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
Set the OAuth2 scope.
Sourcepub fn keycloak(
base_url: impl AsRef<str>,
realm: impl AsRef<str>,
client_id: impl Into<String>,
client_secret: impl Into<String>,
) -> Self
pub fn keycloak( base_url: impl AsRef<str>, realm: impl AsRef<str>, client_id: impl Into<String>, client_secret: impl Into<String>, ) -> Self
Preset for Keycloak (also the Canton LocalNet IdP): builds the
{base_url}/realms/{realm}/protocol/openid-connect/token endpoint.
Trait Implementations§
Source§impl Clone for OidcConfig
impl Clone for OidcConfig
Source§fn clone(&self) -> OidcConfig
fn clone(&self) -> OidcConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OidcConfig
impl RefUnwindSafe for OidcConfig
impl Send for OidcConfig
impl Sync for OidcConfig
impl Unpin for OidcConfig
impl UnsafeUnpin for OidcConfig
impl UnwindSafe for OidcConfig
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request