User Tools

Site Tools


integration-api:example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
integration-api:example [2018/08/21 15:07]
tjotov
integration-api:example [2019/08/01 09:59]
tjotov removed
Line 1: Line 1:
 ====== Web Integration API - Example ====== ====== Web Integration API - Example ======
  
-<code> +<code html
-<!DOCTYPE html>+
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
 +
 <head> <head>
 <script type="text/javascript" src="/aducid-resources/js/jquery.min.js"></script> <script type="text/javascript" src="/aducid-resources/js/jquery.min.js"></script>
 <script type="text/javascript" src="/aducid-resources/js/aducid-api.js"></script> <script type="text/javascript" src="/aducid-resources/js/aducid-api.js"></script>
- 
  
 <script type="text/javascript"> <script type="text/javascript">
Line 17: Line 17:
         aducid.setProxyUrl("/aducid-binder/proxy");         aducid.setProxyUrl("/aducid-binder/proxy");
         aducid.setRedirectUrl("/aducid-binder/");         aducid.setRedirectUrl("/aducid-binder/");
 +        aucid.setRedirectUrl("/myapp/authenticated");
 +        aducid.setErrorPage("/myapp/errorPage");
 +        
         aducid.processResult = function(result) {         aducid.processResult = function(result) {
-            if (result.status == "OK" || result.status == "ALF") {+            if (result.status == "OK") {
                 alert("Success - status: " + result.status);                 alert("Success - status: " + result.status);
                 location.href = result.redirect;                 location.href = result.redirect;
Line 39: Line 42:
  
         aducid.showQRHint = function(param) {         aducid.showQRHint = function(param) {
-            $('#qr-code-hint').html("scan QR or click button to authenticate");+            $('#qr-code-hint').html("Scan QR or click button to authenticate");
         }         }
  
         aducid.showRunningHint = function(param) {         aducid.showRunningHint = function(param) {
-            $('#qr-code-hint').html("operation is runníng");+            $('#qr-code-hint').html("Operation is runni­ng");
         };         };