diff --git a/python/flask/requirements.txt b/python/flask/requirements.txt index ff445467..4e16f12d 100644 --- a/python/flask/requirements.txt +++ b/python/flask/requirements.txt @@ -9,4 +9,5 @@ wheel>=0.31.1 docopt>=0.6.1 restpki-client>=1.1.1 pkiexpress>=1.10.0 -amplia-client>=1.0.0 \ No newline at end of file +amplia-client>=1.0.0 +cloudhub-client >= 1.0.1 \ No newline at end of file diff --git a/python/flask/sample/__init__.py b/python/flask/sample/__init__.py index c1b36af6..32933580 100644 --- a/python/flask/sample/__init__.py +++ b/python/flask/sample/__init__.py @@ -26,6 +26,7 @@ def create_app(): app = Flask(__name__) + app.env = os.getenv('FLASK_ENV') # Select configuration based on the application environment. if app.env not in config: diff --git a/python/flask/sample/config.py b/python/flask/sample/config.py index 0f8f05f7..ff98e1f7 100644 --- a/python/flask/sample/config.py +++ b/python/flask/sample/config.py @@ -60,6 +60,10 @@ class Config(object): # Web PKI # -------------------------------------------------------------------------- WEB_PKI_LICENSE = None + # -------------------------------------------------------------------------- + # Cloudhub + # -------------------------------------------------------------------------- + CLOUDHUB_API_KEY = 'mR1j0v7L12lBHnxpgxVkIdikCN9Gm89rn8I9qet3UHo=' class ProductionConfig(Config): diff --git a/python/flask/sample/templates/home/index.html b/python/flask/sample/templates/home/index.html index 2647bcff..eb368cfa 100644 --- a/python/flask/sample/templates/home/index.html +++ b/python/flask/sample/templates/home/index.html @@ -91,6 +91,9 @@ signPdfCloudOAuth: { express: '/check-express/upload/pades-cloud-oauth' }, + signPdfCloudhubServer: { + restpki: 'check-rest-token/server-files/pades-signature-cloudhub/signPdf' + }, signXmlServer: { restpki: '/check-rest-token/xml-signature' }, diff --git a/python/flask/sample/templates/pades_signature_cloudhub_rest/discover.html b/python/flask/sample/templates/pades_signature_cloudhub_rest/discover.html new file mode 100644 index 00000000..326232a2 --- /dev/null +++ b/python/flask/sample/templates/pades_signature_cloudhub_rest/discover.html @@ -0,0 +1,69 @@ +{% extends "layout.html" %} + +{% block content %} + +
Possible reasons include: +
To configure the PKI Express you need to configure all providers by running the
+ following commands on the terminal:
+ pkie config --set trustServices:{provider}:clientId={value}
+ pkie config --set trustServices:{provider}:clientSecret={value}
+
For customized providers you neet to also configure the endpoint:
+ pkie config --set trustServices:{provider}:endpoint={value}
+
The standard providers are: +
File signed successfully!
+ +