User Tools

Site Tools


integration-api:start

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:start [2018/06/26 09:30]
tjotov [Basic usage]
integration-api:start [2019/08/01 09:56]
tjotov removed
Line 1: Line 1:
-====== ADUCID Integration API ====== +====== Web Integration API ====== 
-Integration API is an essential part of ADUCID for all web browser scenarios. It connects PEIG, AIM and the browser. Integration API is an essential component of [[integration:binder|ADUCID Binder]], [[integration:transactions|No-code transactions]] and many other components.+Web Integration API is an essential part of ADUCID for all web browser scenarios. It connects PEIG, AIM and the browser. Integration API is an essential component of [[components:binder|ADUCID Binder]], [[nocode:transactions|No-Code transacations]] and many other components.
  
 Integration API is located in aducid-resurces folder (on Tomcat). It requires jQuery and API js and css files: Integration API is located in aducid-resurces folder (on Tomcat). It requires jQuery and API js and css files:
 +<sxh javascript>
    <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>
    <link type="text/css" media="screen" href="/aducid-resources/css/aducid.css" rel="stylesheet" />    <link type="text/css" media="screen" href="/aducid-resources/css/aducid.css" rel="stylesheet" />
-     +</sxh>     
 ===== Basic usage with AAA ===== ===== Basic usage with AAA =====
 Create instance of ADUCID object: Create instance of ADUCID object:
 +<sxh java>
     var aducid = new ADUCID();     var aducid = new ADUCID();
 +</sxh>
  
 Set addresses of start, check and proxy operation of aducid-binder:  Set addresses of start, check and proxy operation of aducid-binder: 
-        aducid.setStartOperationUrl("/aducid-binder/open"); +<sxh java> 
-        aducid.setResultOperationUrl("/aducid-binder/openCheck"); +   aducid.setStartOperationUrl("/aducid-binder/open"); 
-        aducid.setProxyUrl("/aducid-binder/proxy");+   aducid.setResultOperationUrl("/aducid-binder/openCheck"); 
 +   aducid.setProxyUrl("/aducid-binder/proxy"); 
 +</sxh> 
 +         
 +Override default methods to customize you page: 
 +<sxh java> 
 +   aducid.processResult = function(result) { 
 +      if (result.status == "OK") { 
 +         //authentication successful - reload page, redirect or display authenticated content 
 +         location.reload(); 
 +      } 
 +      else { 
 +         //display error status from result.data.message 
 +      } 
 +   } 
 +</sxh> 
 + 
 +Text displayed before operation    
 +<sxh java> 
 +   aducid.showQRHint = function(param) { 
 +      $('#qr-code-hint').html("Example text - Use your PEIG to authenticate"); 
 +   } 
 +</sxh> 
 +    
 +Text displayed duringoperation    
 +<sxh java> 
 +   aducid.showRunningHint = function(param) { 
 +      $('#qr-code-hint').html("Example text - Operation in progress"); 
 +   } 
 +</sxh> 
 +    
 +===== Detailed description ===== 
 +[[integration-api:example|Web Integration API - Example]] 
 + 
 +[[integration-api:detailed|ADUCID Integration API Description]]