pub struct AuthConfig {
pub remote_endpoint: Option<String>,
pub machine_token: Option<String>,
}Expand description
Auth configuration parsed from auth.* keys. Controls whether this client
resolves provider tokens from the local auth.json (default) or from a
remote credential broker. See task #157 / auth::credential_source.
Fields§
§remote_endpoint: Option<String>Broker base URL. When set (here, or via SYNAPS_AUTH_ENDPOINT), the
client fetches short-lived access tokens from the broker instead of
reading/refreshing the local auth.json.
machine_token: Option<String>Per-machine bearer presented to the broker (or SYNAPS_MACHINE_TOKEN).
This is the machine’s own identity, never the provider credential.
Implementations§
Source§impl AuthConfig
impl AuthConfig
Sourcepub fn credential_source(&self) -> CredentialSource
pub fn credential_source(&self) -> CredentialSource
Resolve the credential source. Environment variables take precedence over
config-file values: SYNAPS_AUTH_ENDPOINT / SYNAPS_MACHINE_TOKEN.
Returns Remote iff an endpoint is set (env or config), else Local.
Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§impl Debug for AuthConfig
impl Debug for AuthConfig
Auto Trait Implementations§
impl Freeze for AuthConfig
impl RefUnwindSafe for AuthConfig
impl Send for AuthConfig
impl Sync for AuthConfig
impl Unpin for AuthConfig
impl UnsafeUnpin for AuthConfig
impl UnwindSafe for AuthConfig
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