diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-02-25 13:45:34 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-02-25 13:45:34 +0100 |
commit | dbd565ec8195117306ae869f4e7b507ff275ed32 (patch) | |
tree | c2861cab1fe17a50464aec710ecdf7f52b5862c4 /simpleSigning/src/main/webapp | |
parent | d420ee89e58d271e3f5ab202309e659f709fd0f5 (diff) | |
download | einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.tar.gz einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.tar.bz2 einfach-signieren-dbd565ec8195117306ae869f4e7b507ff275ed32.zip |
added QR Code generation + Base64 Data provising
Diffstat (limited to 'simpleSigning/src/main/webapp')
-rw-r--r-- | simpleSigning/src/main/webapp/WEB-INF/web.xml | 31 | ||||
-rw-r--r-- | simpleSigning/src/main/webapp/index.jsp | 136 |
2 files changed, 159 insertions, 8 deletions
diff --git a/simpleSigning/src/main/webapp/WEB-INF/web.xml b/simpleSigning/src/main/webapp/WEB-INF/web.xml index 4e292a8..44aa624 100644 --- a/simpleSigning/src/main/webapp/WEB-INF/web.xml +++ b/simpleSigning/src/main/webapp/WEB-INF/web.xml @@ -8,6 +8,21 @@ <display-name>Simple Signing</display-name> <description>Simple Signing Application</description> + <filter> + <filter-name>CORS</filter-name> + <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class> + + <init-param> + <param-name>cors.allowOrigin</param-name> + <param-value>*</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>CORS</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <servlet> <servlet-name>PDFASJsServlet</servlet-name> <display-name>PDFASJsServlet</display-name> @@ -15,7 +30,7 @@ <servlet-class>at.gv.egiz.simpleSigning.PDFASJsServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <servlet> <servlet-name>StartSignature</servlet-name> <display-name>StartSignature</display-name> @@ -23,7 +38,7 @@ <servlet-class>at.gv.egiz.simpleSigning.StartSignature</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <servlet> <servlet-name>Provider</servlet-name> <display-name>Provider</display-name> @@ -31,7 +46,7 @@ <servlet-class>at.gv.egiz.simpleSigning.Provider</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <servlet> <servlet-name>JQueryServlet</servlet-name> <display-name>JQueryServlet</display-name> @@ -47,7 +62,7 @@ <servlet-class>at.gv.egiz.simpleSigning.FinishSignature</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <servlet> <servlet-name>ErrorSignature</servlet-name> <display-name>ErrorSignature</display-name> @@ -55,7 +70,7 @@ <servlet-class>at.gv.egiz.simpleSigning.ErrorSignature</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <servlet> <servlet-name>VersionServlet</servlet-name> <display-name>VersionServlet</display-name> @@ -63,7 +78,7 @@ <servlet-class>at.gv.egiz.simpleSigning.VersionServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> - + <!-- Define mappings that are used by the servlet container to translate a particular request URI (context-relative) to a particular servlet. The examples below correspond to the servlet descriptions above. Thus, a request @@ -110,7 +125,7 @@ </session-config> <welcome-file-list> - <welcome-file>index.jsp</welcome-file> - </welcome-file-list> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> </web-app>
\ No newline at end of file diff --git a/simpleSigning/src/main/webapp/index.jsp b/simpleSigning/src/main/webapp/index.jsp index 9588789..f1da513 100644 --- a/simpleSigning/src/main/webapp/index.jsp +++ b/simpleSigning/src/main/webapp/index.jsp @@ -5,10 +5,143 @@ <script type="text/javascript" src="pdfas.js"></script> <script type="text/javascript"> + + var testpdf = "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURl" + + "Y29kZT4+CnN0cmVhbQp4nDPQM1Qo5ypUMABCM0MjBXNLI4WiVK5wLYU8qKiBQlE6l1MIl6mZnoWC" + + "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" + + "y/MdVZZnn9lqWXzm+jMMpW98ptjkH/1zcuKpM08xqcdnHj/7ODvz2NnHmAvT89NMJlhrSU7ZLVMd" + + "2yycu3KwwM0OathlC430HrbV+COjHssoOh0aqrcMddRa1rlLB9VYrAodDayFbWF72CR7hp1nC7R9" + + "wSpLL34Xg9eDjKHH0uPqwRkueqJdViTan9o/s5/t9NdaAh27LIYOS4er43LHJx3XOjSjHeRF/Pgv" + + "+Of9rMdf6/J7/FVW/8aAebDCXT5odBsGGQKDxA2DLsOygTEYRg0nDKwBWoCZqSBqMkfOzg702+1d" + + "cwXLfV2SNnhIIiclWz89enqHJM1JCQaHDoVmCfmT8GOnT0Pbpi6poT8kRTaFu6QYCh4qzKBg3DRb" + + "AW3hTCZrp4PY7SgexSPYjyI0ksmDYF8xgz1DMhnIZIid2mQREcjYKUwRGkMwciQD9ECtdtmLSplM" + + "5ch/A/czZpsKZW5kc3RyZWFtCmVuZG9iagoKNiAwIG9iago0MTgzCmVuZG9iagoKNyAwIG9iago8" + + "PC9UeXBlL0ZvbnREZXNjcmlwdG9yL0ZvbnROYW1lL0JBQUFBQStMaWJlcmF0aW9uU2VyaWYKL0Zs" + + "YWdzIDQKL0ZvbnRCQm94Wy0xNzYgLTMwMyAxMDA1IDk4MV0vSXRhbGljQW5nbGUgMAovQXNjZW50" + + "IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgOTgxCi9TdGVtViA4MAovRm9udEZpbGUyIDUg" + + "MCBSCj4+CmVuZG9iagoKOCAwIG9iago8PC9MZW5ndGggMjQwL0ZpbHRlci9GbGF0ZURlY29kZT4+" + + "CnN0cmVhbQp4nF1Qy2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ydHhyZWYKNTc3NAolJUVPRgo="; + function clearDiv() { document.getElementById("embedded").innerHTML = ""; document.getElementById("btnSign").disabled = false; } + + function signBase64WithQR() { + var op = { + content : testpdf, + qrdata: "http://goo.gl/wuAk6s" + }; + + pdfAs.signPdfBase64(op, function(code, msg) { + var element = document.getElementById("Error"); + element.innerHTML = "<p>Error: " + code + " (" + msg + ")</p>"; + element.style.display = "block"; + clearDiv(); + }, function(pdfurl) { + var element = document.getElementById("Result"); + element.innerHTML = "<a href=\"" + pdfurl + "\">ready</a>"; + element.style.display = "block"; + clearDiv(); + }); + // so we don't follow the form ... + return false; + } function signWidthContent() { @@ -141,6 +274,9 @@ <div class="form-group"> <button id="btnVersion" onclick="return showVersion();">zeige Version</button> </div> + <!-- div class="form-group"> + <button id="btnBase64" onclick="return signBase64WithQR();">sign B64 Content</button> + </div --> </form> </div> |