How my program can obtain user’s ID from KeyShield SSO server?

KeyShield SSO server has easy to use interface, especially designed for time and resources effective integration. Complete example of KeyShield SSO integrated code follows. It’s Python but other languages implementations are nearly same. Refer to KeyShield SSO SDK available at Download section for all the information and a Java integration library designed for non-LDAP enabled applications.

Note: You can run this example as command line utility if correct KeyShield SSO server url is specified.


import sys
import urllib2
import json
 
REQUEST_URL = "http://10.0.0.7:8485/json/userByIP/%s"
 
if len(sys.argv) == 2:
 ip = sys.argv[1]
else:
 ip = raw_input("Enter IP address:")
print "IP: %s"%(ip,)
 
try:
 data = urllib2.urlopen(REQUEST_URL%(ip,))
 obj = json.load(data)
   
 if "fdn" in obj:
  print "FDN: %s"%(obj["fdn"],)
 else:
  print "Invalid response format"
 
except Exception as ex:
 print ex