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 more