GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — ToolContextCredentialStore | ADK for TypeScript: API Reference - v2.5.0

  • ToolContextCredentialStore

Class ToolContextCredentialStore

Stores and retrieves exchanged credentials in the session state carried by a Context.

  • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:72

Constructors

constructor

  • new ToolContextCredentialStore(context: Context): ToolContextCredentialStore

    Parameters

    • context: Context

    Returns ToolContextCredentialStore

    • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:73

Methods

getCredential

  • getCredential(
        authScheme?: AuthScheme,
        authCredential?: AuthCredential,
    ): AuthCredential | undefined

    Returns the credential stored for this scheme and credential pair, or undefined when there is none.

    Parameters

    • OptionalauthScheme: AuthScheme
    • OptionalauthCredential: AuthCredential

    Returns AuthCredential | undefined

    Throws

    Error if the state entry under the key is not an AuthCredential, which means something else wrote to the key.

    • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:107

getCredentialKey

  • getCredentialKey(
        authScheme?: AuthScheme,
        authCredential?: AuthCredential,
    ): string

    Returns the state key that holds the credential exchanged for this scheme and credential pair.

    Both operands are hashed into the key, so two tools configured with different schemes, or with different credentials under one scheme, never share a slot.

    The key deliberately carries no temp: prefix. Session state is a copy and only the delta is persisted, and temp: is cleared at the end of a run, while an exchanged token has to stay readable across runs.

    Parameters

    • OptionalauthScheme: AuthScheme
    • OptionalauthCredential: AuthCredential

    Returns string

    • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:87

removeCredential

  • removeCredential(key: string): void

    Makes the credential under key unreadable again.

    adk-python deletes the state entry. State has no delete, so this writes undefined, which State.get returns for a missing key as well, and getCredential therefore misses exactly as a delete would make it.

    Parameters

    • key: string

    Returns void

    • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:145

storeCredential

  • storeCredential(key: string, credential: AuthCredential): void

    Parameters

    • key: string
    • credential: AuthCredential

    Returns void

    • Defined in core/src/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.ts:128
Constructors
constructor
Methods
getCredentialgetCredentialKeyremoveCredentialstoreCredential
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.