pub enum Auth {
None,
ApiKey(String),
EphemeralToken(String),
BearerToken(String),
BearerTokenProvider(BearerTokenProvider),
}Expand description
Authentication method for the WebSocket handshake.
Variants§
None
Send no credentials.
This is mainly useful with Endpoint::Custom when targeting a mock
server, a local test harness, or a proxy that already performs auth.
ApiKey(String)
Standard long-lived API key (sent as ?key= query param).
EphemeralToken(String)
Short-lived token obtained via the ephemeral token endpoint (v1alpha).
BearerToken(String)
OAuth 2.0 bearer token sent via the Authorization header.
This is the first-class auth mode for Endpoint::VertexAi.
BearerTokenProvider(BearerTokenProvider)
Refreshable bearer-token provider.
Use this for endpoints such as Vertex AI where reconnect logic should obtain a fresh token instead of reusing a previously captured string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Auth
impl !RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl !UnwindSafe for Auth
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