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 — OAuth2BearerExchanger | ADK for TypeScript: API Reference - v2.5.0

  • OAuth2BearerExchanger

Class OAuth2BearerExchanger

Converts OAuth2 and OpenID Connect credentials into HTTP bearer credentials.

Ports OAuth2CredentialExchanger from adk-python src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py at tag v0.1.0. The adk-js class carries a different name because OAuth2CredentialExchanger in core/src/auth/oauth2/ already owns that one, and it solves a different problem: it fetches tokens from the token endpoint, where this class converts a token it is given.

Implements

  • BaseCredentialExchanger
  • Defined in core/src/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.ts:118

Constructors

constructor

  • new OAuth2BearerExchanger(): OAuth2BearerExchanger

    Returns OAuth2BearerExchanger

Methods

exchange

  • exchange(
        params: { authCredential: AuthCredential; authScheme?: AuthScheme },
    ): Promise<ExchangeResult>

    Exchange credential if needed.

    Parameters

    • params: { authCredential: AuthCredential; authScheme?: AuthScheme }
      • authCredential: AuthCredential

        The credential to exchange.

      • OptionalauthScheme?: AuthScheme

        The authentication scheme (optional, some exchangers don't need it).

    Returns Promise<ExchangeResult>

    The exchanged credential.

    Throws

    CredentialExchangeError: If credential exchange fails.

    Implementation of BaseCredentialExchanger.exchange

    • Defined in core/src/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.ts:120
Constructors
constructor
Methods
exchange
You are visitor 01402792 — 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.