pub struct AuthRequest<'a> {
pub method: &'a str,
pub params: Option<&'a Value>,
pub transport_authorization: Option<&'a str>,
pub request_id: u64,
}Expand description
Authentication request view used by providers.
Fields§
§method: &'a strJSON-RPC method name.
params: Option<&'a Value>Raw params payload (if present).
Inspecting credentials in JSON-RPC params is a legacy, transport-neutral fallback. Transport integrations should authenticate from their native authorization metadata instead. Any credential field recognized here is removed before extension middleware and handlers receive the request.
Transport-private Authorization field, when the transport has one.
This value is never inserted into JSON-RPC params or exposed to middleware and handlers. When present it must satisfy the strict native header grammar, and no legacy in-band credential may coexist with it.
request_id: u64Internal request ID (u64) used for tracing.
Implementations§
Source§impl AuthRequest<'_>
impl AuthRequest<'_>
Sourcepub fn access_token(&self) -> Option<AccessToken>
pub fn access_token(&self) -> Option<AccessToken>
Returns the one strictly admitted native or legacy access token.
Malformed or ambiguous credential sources return None; the server
rejects those cases before invoking an authentication provider.
Sourcepub fn has_multiple_credential_sources(&self) -> bool
pub fn has_multiple_credential_sources(&self) -> bool
Returns true when more than one recognized credential source is present, including multiple legacy in-band locations.
Trait Implementations§
Source§impl<'a> Clone for AuthRequest<'a>
impl<'a> Clone for AuthRequest<'a>
Source§fn clone(&self) -> AuthRequest<'a>
fn clone(&self) -> AuthRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more