diff --git a/docs/build/doctrees/adobe.pdfservices.operation.auth.doctree b/docs/build/doctrees/adobe.pdfservices.operation.auth.doctree index ec865e9..679bc00 100644 Binary files a/docs/build/doctrees/adobe.pdfservices.operation.auth.doctree and b/docs/build/doctrees/adobe.pdfservices.operation.auth.doctree differ diff --git a/docs/build/doctrees/adobe.pdfservices.operation.doctree b/docs/build/doctrees/adobe.pdfservices.operation.doctree index 91e1180..2f0b596 100644 Binary files a/docs/build/doctrees/adobe.pdfservices.operation.doctree and b/docs/build/doctrees/adobe.pdfservices.operation.doctree differ diff --git a/docs/build/doctrees/adobe.pdfservices.operation.pdfops.doctree b/docs/build/doctrees/adobe.pdfservices.operation.pdfops.doctree index 3aca2d6..3ccb6dd 100644 Binary files a/docs/build/doctrees/adobe.pdfservices.operation.pdfops.doctree and b/docs/build/doctrees/adobe.pdfservices.operation.pdfops.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 1335303..fada71f 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/reference/index.doctree b/docs/build/doctrees/reference/index.doctree index 4d75f12..31378eb 100644 Binary files a/docs/build/doctrees/reference/index.doctree and b/docs/build/doctrees/reference/index.doctree differ diff --git a/docs/build/html/_sources/adobe.pdfservices.operation.auth.rst.txt b/docs/build/html/_sources/adobe.pdfservices.operation.auth.rst.txt index a866f39..2aa9de6 100644 --- a/docs/build/html/_sources/adobe.pdfservices.operation.auth.rst.txt +++ b/docs/build/html/_sources/adobe.pdfservices.operation.auth.rst.txt @@ -20,6 +20,14 @@ adobe.pdfservices.operation.auth.service\_account\_credentials module :undoc-members: :show-inheritance: +adobe.pdfservices.operation.auth.service\_principal\_credentials module +--------------------------------------------------------------------- + +.. automodule:: adobe.pdfservices.operation.auth.service_principal_credentials + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs/build/html/_sources/reference/index.rst.txt b/docs/build/html/_sources/reference/index.rst.txt index bfa1df5..e5e0295 100644 --- a/docs/build/html/_sources/reference/index.rst.txt +++ b/docs/build/html/_sources/reference/index.rst.txt @@ -93,5 +93,20 @@ ServiceAccountCredentialsBuilder :show-inheritance: :noindex: +ServicePrincipalCredentials +-------------------------- +.. autoclass:: adobe.pdfservices.operation.auth.service_principal_credentials.ServicePrincipalCredentials + :members: + :undoc-members: + :show-inheritance: + +ServicePrincipalCredentialsBuilder +-------------------------------- +.. autoclass:: adobe.pdfservices.operation.auth.service_principal_credentials.ServicePrincipalCredentials.Builder + :members: + :undoc-members: + :show-inheritance: + :noindex: + diff --git a/docs/build/html/adobe.pdfservices.html b/docs/build/html/adobe.pdfservices.html index d71ead4..d834362 100644 --- a/docs/build/html/adobe.pdfservices.html +++ b/docs/build/html/adobe.pdfservices.html @@ -61,6 +61,7 @@
Bases: ABC
Marker base class for different types of credentials. Currently it supports only ServiceAccountCredentials
.
+
Marker base class for different types of credentials. Currently it supports ServiceAccountCredentials
and ServicePrincipalCredentials
.
The factory methods within this class can be used to create instances of credentials classes.
Deprecated since version 2.3.0: Notice: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based ServicePrincipalCredentials
.
Creates a new ServicePrincipalCredentials
builder.
An instance of ServicePrincipalCredentials Builder.
+Bases: Credentials
, ABC
Service Account credentials allow your application to call PDF Tools Extract API on behalf of the application itself, -or on behalf of an enterprise organization. For getting the credentials, -Click Here.
+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
.
Deprecated since version 2.3.0: Notice: JWT based service account credentials has been deprecated. Please use OAuth Server-to-Server based ServicePrincipalCredentials
.
Set Organization Id (format: org_ident@AdobeOrg) that has been configured for access to PDF Tools API
+Set Organization Id (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API
organization_id (str) – Organization ID (format: org_ident@AdobeOrg)
@@ -415,7 +453,7 @@Identifies the organization(format: org_ident@AdobeOrg) that has been configured for access to PDF Tools API.
+Identifies the organization (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API.
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.
+Bases: object
Builds a ServicePrincipalCredentials
instance.
Returns a new ServicePrincipalCredentials
instance built from the current state of this builder.
A ServicePrincipalCredentials instance.
+Set Client ID (API Key)
+client_id (str) – Client Id (API Key)
+This Builder instance to add any additional parameters.
+Set Client Secret
+client_secret (str) – Client Secret
+This Builder instance to add any additional parameters.
+Client Id (API Key)
+Client Secret
+try:
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- credentials = Credentials.service_account_credentials_builder() \
- .from_file(base_path + "/pdfservices-api-credentials.json") \
- .build()
+ credentials = Credentials.service_principal_credentials_builder(). with_client_id(os.getenv('PDF_SERVICES_CLIENT_ID')). with_client_secret(os.getenv('PDF_SERVICES_CLIENT_SECRET')). build()
execution_context = ExecutionContext.create(credentials)
extract_pdf_operation = ExtractPDFOperation.create_new()
diff --git a/docs/build/html/adobe.pdfservices.operation.pdfops.html b/docs/build/html/adobe.pdfservices.operation.pdfops.html
index 62ec53b..9518d35 100644
--- a/docs/build/html/adobe.pdfservices.operation.pdfops.html
+++ b/docs/build/html/adobe.pdfservices.operation.pdfops.html
@@ -61,6 +61,7 @@
try:
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- credentials = Credentials.service_account_credentials_builder() \
- .from_file(base_path + "/pdfservices-api-credentials.json") \
- .build()
+ credentials = Credentials.service_principal_credentials_builder(). \
+ with_client_id(os.getenv('PDF_SERVICES_CLIENT_ID')). \
+ with_client_secret(os.getenv('PDF_SERVICES_CLIENT_SECRET')). \
+ build()
execution_context = ExecutionContext.create(credentials)
extract_pdf_operation = ExtractPDFOperation.create_new()
@@ -394,9 +411,10 @@ Submodulestry:
base_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
- credentials = Credentials.service_account_credentials_builder() \
- .from_file(base_path + "/pdfservices-api-credentials.json") \
- .build()
+ credentials = Credentials.service_principal_credentials_builder(). \
+ with_client_id(os.getenv('PDF_SERVICES_CLIENT_ID')). \
+ with_client_secret(os.getenv('PDF_SERVICES_CLIENT_SECRET')). \
+ build()
execution_context = ExecutionContext.create(credentials)
autotag_pdf_operation = AutotagPDFOperation.create_new()
diff --git a/docs/build/html/adobe.pdfservices.operation.pdfops.options.autotagpdf.html b/docs/build/html/adobe.pdfservices.operation.pdfops.options.autotagpdf.html
index cba88e4..33efa34 100644
--- a/docs/build/html/adobe.pdfservices.operation.pdfops.options.autotagpdf.html
+++ b/docs/build/html/adobe.pdfservices.operation.pdfops.options.autotagpdf.html
@@ -61,6 +61,7 @@
- Credentials
@@ -190,6 +191,21 @@
- ServiceAccountCredentialsBuilder
+- ServicePrincipalCredentials
+
+- ServicePrincipalCredentialsBuilder
diff --git a/docs/build/html/adobe.pdfservices.operation.pdfops.options.html b/docs/build/html/adobe.pdfservices.operation.pdfops.options.html
index cbd158c..076f631 100644
--- a/docs/build/html/adobe.pdfservices.operation.pdfops.options.html
+++ b/docs/build/html/adobe.pdfservices.operation.pdfops.options.html
@@ -61,6 +61,7 @@
- Credentials
@@ -190,6 +191,21 @@
- ServiceAccountCredentialsBuilder
+- ServicePrincipalCredentials
+
+- ServicePrincipalCredentialsBuilder
diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html
index ae0a838..03b7349 100644
--- a/docs/build/html/genindex.html
+++ b/docs/build/html/genindex.html
@@ -60,6 +60,7 @@
- Credentials
@@ -189,6 +190,21 @@
- ServiceAccountCredentialsBuilder
+- ServicePrincipalCredentials
+
+- ServicePrincipalCredentialsBuilder
@@ -282,6 +298,13 @@ A
- module
+
+
+ -
+ adobe.pdfservices.operation.auth.service_principal_credentials
+
+
+ - module
-
@@ -326,6 +349,8 @@
A
- module
+
+
-
adobe.pdfservices.operation.operation
@@ -333,8 +358,6 @@
A
- module
-
-
-
adobe.pdfservices.operation.pdfops
@@ -427,6 +450,8 @@
B
- build() (adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials.Builder method), [1]
+ - (adobe.pdfservices.operation.auth.service_principal_credentials.ServicePrincipalCredentials.Builder method), [1]
+
- (adobe.pdfservices.operation.client_config.ClientConfig.Builder method), [1]
- (adobe.pdfservices.operation.pdfops.options.autotagpdf.autotag_pdf_options.AutotagPDFOptions.Builder method), [1]
@@ -451,17 +476,25 @@
C