ServiceAccountCredentialsBuilder

ServiceAccountCredentialsBuilder

Deprecated: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based ServicePrincipalCredentials.

Methods

withClientId(clientIdnon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Set Client ID (API Key)

Parameters:
Name Type Description
clientId String

Client Id (API Key)

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

withClientSecret(clientSecretnon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Set Client Secret

Parameters:
Name Type Description
clientSecret String

Client Secret

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

withPrivateKey(privateKeynon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Set private key

Parameters:
Name Type Description
privateKey String

Content of the Private Key (PEM format)

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

withOrganizationId(organizationIdnon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Set Organization Id (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API

Parameters:
Name Type Description
organizationId String

Organization ID (format: org_ident@AdobeOrg)

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

withAccountId(accountIdnon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Set Account Id (format: id@techacct.adobe.com)

Parameters:
Name Type Description
accountId String

Account ID (format: id@techacct.adobe.com)

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

fromFile(credentialsFilePathnon-null) → {ServiceAccountCredentialsBuilder}

Description:
  • Sets Service Account Credentials using the JSON credentials file path. All the keys in the JSON structure are optional.

    JSON structure:

    {
      "client_credentials": {
        "client_id": "CLIENT_ID",
        "client_secret": "CLIENT_SECRET"
      },
      "service_account_credentials": {
        "organization_id": "org_ident@AdobeOrg",
        "account_id": "id@techacct.adobe.com",
        "private_key_file": "private.key"
      }
    }
    
    private_key_file is the path of private key file. It will be looked up in the classpath and the directory of JSON credentials file.
Parameters:
Name Type Description
credentialsFilePath String

JSON credentials file path

Returns:

This Builder instance to add any additional parameters.

Type
ServiceAccountCredentialsBuilder

build() → {ServiceAccountCredentials}

Description:
Returns:

A ServiceAccountCredentials instance.

Type
ServiceAccountCredentials