pub struct DeviceCodeStrategyBuilder { /* private fields */ }Expand description
Builder for DeviceCodeStrategy.
Created via DeviceCodeStrategy::builder.
Implementations§
Source§impl DeviceCodeStrategyBuilder
impl DeviceCodeStrategyBuilder
Sourcepub fn base_url(self, url: Url) -> Self
pub fn base_url(self, url: Url) -> Self
Override the auth-server base URL resolved for this flow.
Takes precedence over both the CS_CTS_HOST environment variable and
region-derived service discovery. Use it to point a single flow at a
specific host — e.g. a self-hosted CTS, or a local mock auth server in
development — without relying on the process-wide CS_CTS_HOST, which
would redirect every other CTS client sharing the process.
Sourcepub fn device_identity(self, identity: DeviceIdentity) -> Self
pub fn device_identity(self, identity: DeviceIdentity) -> Self
Set the device identity for this strategy.
When set, the device instance ID and name are sent to the auth server during the device code flow and persisted in the token.
Sourcepub fn build(self) -> Result<DeviceCodeStrategy, AuthError>
pub fn build(self) -> Result<DeviceCodeStrategy, AuthError>
Build the DeviceCodeStrategy.
Resolves the base URL in priority order: an explicit base_url
override, then the CS_CTS_HOST environment variable, then service
discovery using the region.
Auto Trait Implementations§
impl Freeze for DeviceCodeStrategyBuilder
impl RefUnwindSafe for DeviceCodeStrategyBuilder
impl Send for DeviceCodeStrategyBuilder
impl Sync for DeviceCodeStrategyBuilder
impl Unpin for DeviceCodeStrategyBuilder
impl UnsafeUnpin for DeviceCodeStrategyBuilder
impl UnwindSafe for DeviceCodeStrategyBuilder
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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