pub struct KontextDevClient { /* private fields */ }Implementations§
Source§impl KontextDevClient
impl KontextDevClient
pub fn new(config: KontextDevConfig) -> Self
pub fn config(&self) -> &KontextDevConfig
pub fn mcp_url(&self) -> Result<String, KontextDevError>
pub fn token_url(&self) -> Result<String, KontextDevError>
pub fn connect_session_url(&self) -> Result<String, KontextDevError>
Sourcepub async fn authenticate_mcp(
&self,
) -> Result<KontextAuthSession, KontextDevError>
pub async fn authenticate_mcp( &self, ) -> Result<KontextAuthSession, KontextDevError>
Authenticate a user via browser PKCE, exchange the identity token to a resource-scoped MCP gateway token, and persist cache for future runs.
Sourcepub async fn create_integration_connect_url(
&self,
gateway_access_token: &str,
) -> Result<String, KontextDevError>
pub async fn create_integration_connect_url( &self, gateway_access_token: &str, ) -> Result<String, KontextDevError>
Request a short-lived connect session and build the hosted integration
connect URL (.../oauth/connect?session=...).
pub fn integration_connect_url( &self, session_id: &str, ) -> Result<String, KontextDevError>
Sourcepub async fn open_integration_connect_page(
&self,
gateway_access_token: &str,
) -> Result<String, KontextDevError>
pub async fn open_integration_connect_page( &self, gateway_access_token: &str, ) -> Result<String, KontextDevError>
Opens the integration connect page in the browser.
pub async fn create_connect_session( &self, gateway_access_token: &str, ) -> Result<ConnectSession, KontextDevError>
pub async fn initiate_integration_oauth( &self, gateway_access_token: &str, integration_id: &str, return_to: Option<&str>, ) -> Result<IntegrationOAuthInitResponse, KontextDevError>
pub async fn integration_connection_status( &self, gateway_access_token: &str, integration_id: &str, ) -> Result<IntegrationConnectionStatus, KontextDevError>
pub async fn wait_for_integration_connection( &self, gateway_access_token: &str, integration_id: &str, timeout_ms: u64, interval_ms: u64, ) -> Result<bool, KontextDevError>
pub async fn exchange_for_resource( &self, subject_token: &str, resource: &str, scope: Option<&str>, ) -> Result<TokenExchangeToken, KontextDevError>
Auto Trait Implementations§
impl Freeze for KontextDevClient
impl !RefUnwindSafe for KontextDevClient
impl Send for KontextDevClient
impl Sync for KontextDevClient
impl Unpin for KontextDevClient
impl !UnwindSafe for KontextDevClient
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