jsforce
    Preparing search index...

    Class OAuth2

    OAuth2 class

    Index
    _transport: Transport
    authzServiceUrl: string
    clientId: Optional<string>
    clientSecret: Optional<string>
    codeVerifier: Optional<string>
    loginUrl: string
    redirectUri: Optional<string>
    revokeServiceUrl: string
    tokenServiceUrl: string
    • OAuth2 Username-Password Flow (Resource Owner Password Credentials)

      Parameters

      • username: string
      • password: string

      Returns Promise<TokenResponse>

    • Send access token request to the token endpoint. When a code (string) is passed in first argument, it will use Web Server Authentication Flow (Authorization Code Grant). Otherwise, it will use the specified grant_type and pass parameters to the endpoint.

      Parameters

      • codeOrParams: string | { grant_type: string; [name: string]: string }
      • params: { [prop: string]: string } = {}

      Returns Promise<TokenResponse>

    • OAuth2 Revoke Session Token

      Parameters

      • token: string

      Returns Promise<void>