adobe.pdfservices.operation.auth package
Submodules
adobe.pdfservices.operation.auth.credentials module
- class adobe.pdfservices.operation.auth.credentials.Credentials
Bases:
ABC
Marker base class for different types of credentials. Currently it supports
ServiceAccountCredentials
andServicePrincipalCredentials
. The factory methods within this class can be used to create instances of credentials classes.- static service_account_credentials_builder()
Creates a new
ServiceAccountCredentials
builder.- Returns:
An instance of ServiceAccountCredentials Builder.
- Return type:
Deprecated since version 2.3.0: Notice: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based
ServicePrincipalCredentials
.
- static service_principal_credentials_builder()
Creates a new
ServicePrincipalCredentials
builder.- Returns:
An instance of ServicePrincipalCredentials Builder.
- Return type:
adobe.pdfservices.operation.auth.service_account_credentials module
- class adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials(client_id, client_secret, private_key, organization_id, account_id)
Bases:
Credentials
,ABC
Service Account credentials allow your application to call PDF Services API on behalf of the application itself, or on behalf of an enterprise organization.
Deprecated since version 2.3.0: Notice: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based
ServicePrincipalCredentials
.- class Builder
Bases:
object
Builds a
ServiceAccountCredentials
instance.- build()
Returns a new
ServiceAccountCredentials
instance built from the current state of this builder.- Returns:
A ServiceAccountCredentials instance.
- Return type:
Deprecated since version 2.3.0: Notice: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based
ServicePrincipalCredentials
.
- from_file(credentials_file_path: str)
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:
credentials_file_path (str) – JSON credentials file path
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_account_id(account_id: str)
Set Account Id (format: id@techacct.adobe.com)
- Parameters:
account_id (str) – Account ID (format: id@techacct.adobe.com)
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_client_id(client_id: str)
Set Client ID (API Key)
- Parameters:
client_id (str) – Client Id (API Key)
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_client_secret(client_secret: str)
Set Client Secret
- Parameters:
client_secret (str) – Client Secret
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_organization_id(organization_id: str)
Set Organization Id (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API
- Parameters:
organization_id (str) – Organization ID (format: org_ident@AdobeOrg)
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_private_key(private_key: str)
Set private key
- Parameters:
private_key (str) – Content of the Private Key (PEM format)
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- property account_id
Account ID(format: id@techacct.adobe.com)
- property client_id
Client Id (API Key)
- property client_secret
Client Secret
- property organization_id
Identifies the organization (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API.
- property private_key
Content of the Private Key (PEM format)
adobe.pdfservices.operation.auth.service_principal_credentials module
- class adobe.pdfservices.operation.auth.service_principal_credentials.ServicePrincipalCredentials(client_id, client_secret)
Bases:
Credentials
,ABC
OAuth Server-to-Server based Service Principal credentials allow your application to call PDF Services API on behalf of the application itself, or on behalf of an enterprise organization. For getting the credentials, Click Here.
- class Builder
Bases:
object
Builds a
ServicePrincipalCredentials
instance.- build()
Returns a new
ServicePrincipalCredentials
instance built from the current state of this builder.- Returns:
A ServicePrincipalCredentials instance.
- Return type:
- with_client_id(client_id: str)
Set Client ID (API Key)
- Parameters:
client_id (str) – Client Id (API Key)
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- with_client_secret(client_secret: str)
Set Client Secret
- Parameters:
client_secret (str) – Client Secret
- Returns:
This Builder instance to add any additional parameters.
- Return type:
- property client_id
Client Id (API Key)
- property client_secret
Client Secret