pub struct TokenExchangeConfig {
pub client_id: String,
pub client_secret: String,
pub subject_issuer: Option<String>,
pub scope: Option<String>,
}Expand description
[sites.X.token_exchange]: client credentials for exchanging the
caller’s CSCS Keycloak token for a token the site accepts.
csmsites use an RFC 8693 token exchange at the site’s Keycloak (shastarealm), at a URL derived fromshasta_base_url(<base without a trailing /apis>/keycloak). They needsubject_issuer.ochamisites use an RFC 7523 JWT bearer grant at the site’s Hydra, at a URL derived fromshasta_base_url(<base>/hydra/oauth2/token). They needscope.
TokenExchangeConfig::csm and TokenExchangeConfig::ochami
check that the backend’s fields are present.
Fields§
§client_id: StringClient allowed to exchange tokens, e.g. cscs-token-exchanger.
client_secret: StringSecret of the confidential client_id.
subject_issuer: Option<String>csm only: alias of the CSCS identity provider in the shasta
realm, e.g. cscs.
scope: Option<String>ochami only: space-separated scopes to request.
Implementations§
Trait Implementations§
Source§impl Clone for TokenExchangeConfig
impl Clone for TokenExchangeConfig
Source§impl Debug for TokenExchangeConfig
impl Debug for TokenExchangeConfig
Source§impl<'de> Deserialize<'de> for TokenExchangeConfig
impl<'de> Deserialize<'de> for TokenExchangeConfig
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
Auto Trait Implementations§
impl Freeze for TokenExchangeConfig
impl RefUnwindSafe for TokenExchangeConfig
impl Send for TokenExchangeConfig
impl Sync for TokenExchangeConfig
impl Unpin for TokenExchangeConfig
impl UnsafeUnpin for TokenExchangeConfig
impl UnwindSafe for TokenExchangeConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreCreates a shared type from an unshared type.