pub struct ServiceAuth {
pub scheme: String,
pub auth_url: Option<String>,
pub token_url: Option<String>,
pub scopes: Vec<String>,
pub header: Option<String>,
pub client_id_setting: Option<String>,
pub credentials_help_url: Option<String>,
}Expand description
Auth contract for a service integration. scheme selects the strategy; the
remaining fields are the declarative parameters that strategy needs.
Fields§
§scheme: StringOne of oauth2 | bearer | basic | api_key.
auth_url: Option<String>OAuth2 authorization endpoint (scheme == oauth2).
token_url: Option<String>OAuth2 token endpoint (scheme == oauth2).
scopes: Vec<String>OAuth2 scopes requested at consent.
header: Option<String>Request header carrying the credential for api_key / bearer
(e.g. Authorization, X-Api-Key). Defaults to Authorization.
client_id_setting: Option<String>Settings key holding the operator-supplied OAuth client id (scheme == oauth2).
credentials_help_url: Option<String>Optional provider console URL where the user obtains the credentials (e.g. the OAuth client id + secret). Shown as a help link in Settings. A branded URL — authored as catalog data, never hard-coded in the UI.
Implementations§
Source§impl ServiceAuth
impl ServiceAuth
Sourcepub fn header_name(&self) -> &str
pub fn header_name(&self) -> &str
The header carrying the credential, defaulting to Authorization.
Trait Implementations§
Source§impl Clone for ServiceAuth
impl Clone for ServiceAuth
Source§fn clone(&self) -> ServiceAuth
fn clone(&self) -> ServiceAuth
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceAuth
impl Debug for ServiceAuth
Source§impl<'de> Deserialize<'de> for ServiceAuth
impl<'de> Deserialize<'de> for ServiceAuth
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServiceAuth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServiceAuth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ServiceAuth
impl Serialize for ServiceAuth
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ServiceAuth
impl RefUnwindSafe for ServiceAuth
impl Send for ServiceAuth
impl Sync for ServiceAuth
impl Unpin for ServiceAuth
impl UnsafeUnpin for ServiceAuth
impl UnwindSafe for ServiceAuth
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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