vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class SalesforceOAuth2

    Index

    Constructors

    Properties

    authzServiceUrl: string
    clientId: string
    clientSecret: string
    loginUrl: string
    redirectUri: string
    revokeServiceUrl: string
    tokenServiceUrl: string
    transport: Transport

    Methods

    • Introspect checks the current state of an OAuth 2.0 access or refresh token.

      Parameters

      • token: string

        Token strign to introspect

      • type: "refresh_token" | "access_token"

        Type of token to introspect

      Returns Promise<Record<string, any>>

    Privatepost

    • post<T>(params: Record<string, string>, options?: { url?: string }): Promise<T>

      Post a request to token service

      Type Parameters

      • T

      Parameters

      • params: Record<string, string>

        Params as object send as URL encoded data

      • Optionaloptions: { url?: string }

      Returns Promise<T>

      Response body as JSON object

    • Refreshes the oauth token and returns an OAuth2TokenResponse object.

      Parameters

      • refreshToken: string

        The refresh token used to get a new access token

      Returns Promise<OAuth2TokenResponse>

      New access token

    • Retrieves user information using the provided access token.

      Parameters

      • accessToken: string

        The access token to use for authentication.

      Returns Promise<Record<string, any>>

      A promise that resolves to an object containing user information.