moonbitlang/openseek/mcp/oauth does not have a README file

    AuthorizationCodeClient

    type AuthorizationCodeClient

    A public OAuth client configured for one MCP resource and redirect URI.

    AuthorizationCodeClient::accepts_issuer

    fn AuthorizationCodeClient::accepts_issuer(self : AuthorizationCodeClient, issuer : String?) -> Bool

    Check the callback issuer, requiring it when advertised by the provider.

    AuthorizationCodeClient::auth_code_url

    fn AuthorizationCodeClient::auth_code_url(self : AuthorizationCodeClient, state~ : String, challenge~ : String) -> String

    Build the URL to open in the browser with an S256 PKCE challenge.

    AuthorizationCodeClient::exchange

    async fn AuthorizationCodeClient::exchange(self : AuthorizationCodeClient, code~ : String, verifier~ : String) -> Token

    Exchange the authorization code after the caller verifies the callback.

    CredentialCommit

    type CredentialCommit

    Publishes the credential for one authorization attempt and coordinates cancellation.

    CredentialCommit::CredentialCommit

    Prepare a credential save for the given resource and OAuth configuration.

    CredentialCommit::cancel

    async fn CredentialCommit::cancel(self : CredentialCommit) -> Unit

    Prevent a future save and wait for any atomic replacement already in progress.

    CredentialCommit::save

    async fn CredentialCommit::save(self : CredentialCommit, token : Token) -> Unit

    Store the token from this attempt unless the attempt was cancelled.

    DeviceAuthResponse

    type DeviceAuthResponse

    One device authorization. Device codes remain in the host, never in UI replies.

    DeviceAuthResponse::user_code

    fn DeviceAuthResponse::user_code(self : DeviceAuthResponse) -> String

    The short code the user enters on the provider page.

    DeviceAuthResponse::verification_uri

    fn DeviceAuthResponse::verification_uri(self : DeviceAuthResponse) -> String

    The provider page where the user approves this request.

    Token

    type Token

    A token returned by the provider, ready to use or save as a credential.

    Token::access_token

    fn Token::access_token(self : Token) -> String

    The bearer token issued by the provider.

    authorized

    async fn authorized(resource : String, config :
    OAuthConfig
    ) -> Bool

    Check the local grant without making a token request from the settings page.

    device_access_token

    Poll at the provider's interval until a token is issued or the flow ends.

    device_auth

    Start a user-initiated device authorization.

    disconnect

    async fn disconnect(resource : String, config :
    OAuthConfig
    ) -> Unit

    Remove the local grant. Browser refresh and publication take the same lock.

    discover_authorization_code

    async fn discover_authorization_code(config :
    AuthorizationCodeConfig
    , resource~ : String, redirect_uri~ : String) -> AuthorizationCodeClient

    Discover the issuer and obtain a dynamically registered public client.

    key

    fn key(resource : String, config :
    OAuthConfig
    ) -> String

    Scope credentials to the complete MCP resource and OAuth client configuration.

    token

    async fn token(resource : String, config :
    OAuthConfig
    ) -> String?

    Read a usable token, refreshing browser grants before they expire.