pub struct TokenConfig {
pub client_id: String,
pub client_secret: String,
pub issuer_url: Url,
pub tls_insecure: bool,
pub tls_ca_certificates: CommaSeparatedVec,
pub refresh_before: Option<Duration>,
}Expand description
All required configuration when authentication is enabled.
Fields§
§client_id: String§client_secret: String§issuer_url: Url§tls_insecure: bool§tls_ca_certificates: CommaSeparatedVec§refresh_before: Option<Duration>Implementations§
Source§impl TokenConfig
impl TokenConfig
pub async fn into_client(self, redirect: Option<String>) -> Result<Client>
Sourcepub async fn discover_from(self) -> Result<OpenIdTokenProvider>
pub async fn discover_from(self) -> Result<OpenIdTokenProvider>
Create a new provider by discovering the OAuth2 client from the configuration
Trait Implementations§
Source§impl Clone for TokenConfig
impl Clone for TokenConfig
Source§fn clone(&self) -> TokenConfig
fn clone(&self) -> TokenConfig
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 moreSource§impl Debug for TokenConfig
impl Debug for TokenConfig
Source§impl<'de> Deserialize<'de> for TokenConfig
impl<'de> Deserialize<'de> for TokenConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TokenConfig
impl PartialEq for TokenConfig
impl Eq for TokenConfig
impl StructuralPartialEq for TokenConfig
Auto Trait Implementations§
impl Freeze for TokenConfig
impl RefUnwindSafe for TokenConfig
impl Send for TokenConfig
impl Sync for TokenConfig
impl Unpin for TokenConfig
impl UnwindSafe for TokenConfig
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<'de, T> ConfigFromEnv<'de> for Twhere
T: Deserialize<'de>,
impl<'de, T> ConfigFromEnv<'de> for Twhere
T: Deserialize<'de>,
fn from(env: Environment) -> Result<T, ConfigError>
Source§fn from_env() -> Result<Self, ConfigError>
fn from_env() -> Result<Self, ConfigError>
Get a configuration from the env-vars.
Source§fn from_env_prefix<S: AsRef<str>>(prefix: S) -> Result<Self, ConfigError>
fn from_env_prefix<S: AsRef<str>>(prefix: S) -> Result<Self, ConfigError>
Get a configuration from the env-vars, prefixing all with the provided prefix plus
the separator.
fn from_set<K, V>(set: HashMap<K, V>) -> Result<Self, ConfigError>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.