pub struct ExternalAuth {
pub token_endpoint: String,
pub header: String,
pub scheme: String,
}Expand description
Per-user bearer resolution for an external MCP server.
The MCP gateway exposes no token vault of its own; instead an extension
banks the calling user’s third-party token and serves it from
token_endpoint. At tool-call time core GETs that accessor with the
user’s systemprompt JWT and injects the returned bearer onto header (as
{scheme} {token}), replacing the systemprompt credential so nothing
internal reaches the third party.
Fields§
§token_endpoint: String§header: String§scheme: StringImplementations§
Source§impl ExternalAuth
impl ExternalAuth
Sourcepub fn header_value(&self, bearer: &str) -> String
pub fn header_value(&self, bearer: &str) -> String
The value to send on Self::header for bearer: "{scheme} {token}", or the raw token when scheme is empty (providers that
expect a bare credential, e.g. an X-Api-Key).
Trait Implementations§
Source§impl Clone for ExternalAuth
impl Clone for ExternalAuth
Source§fn clone(&self) -> ExternalAuth
fn clone(&self) -> ExternalAuth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExternalAuth
impl Debug for ExternalAuth
Source§impl<'de> Deserialize<'de> for ExternalAuth
impl<'de> Deserialize<'de> for ExternalAuth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExternalAuth
impl RefUnwindSafe for ExternalAuth
impl Send for ExternalAuth
impl Sync for ExternalAuth
impl Unpin for ExternalAuth
impl UnsafeUnpin for ExternalAuth
impl UnwindSafe for ExternalAuth
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