...
Call the"Hello" method in DualShield to check the connection
Code Block | ||
---|---|---|
| ||
def test_1_hello(self): r=self.auth.execute("auth/hello", {}) |
...
The authentication method for verifying Static Password is "SPASS"
Code Block | ||
---|---|---|
| ||
def test_2_staticpass(self): #logon with 'static password' credential username=raw_input('Please enter your login name:') password=raw_input('Please enter your AD password:') params = { 'user':{'loginName':username, 'domain.name':domainname}, 'credential':{'method':'SPASS', 'password':password} } r=self.auth.execute("auth/verify", params) |
...
The authentication method for verifying Static Password is "OTP"
Code Block | ||
---|---|---|
| ||
def test_3_verifySafeID(self): otp=raw_input('Please enter you SafeIDotp:') params = { 'user':{'loginName':username, 'domain.name':domainname}, 'credential':{'method':'OTP', 'otp':otp} } r=self.auth.execute("auth/verify", params) |
...
To deliver an on-demand password to a user via email message (SMTP)
Code Block | ||
---|---|---|
| ||
def test_4_sendOTP(self): username=raw_input('Please enter your login name:') params = { 'user':{'loginName':username, 'domain.name':domainname}, 'options':{'channel':'SMTP'} } r=self.auth.execute("auth/sendOTP", params) |
...
The authentication method for verifying On-Demand Password is "OTPoD"
Code Block | ||
---|---|---|
| ||
def test_5_verifyODP(self): username=raw_input('Please enter your login name:') otp=raw_input('Please enter you otp:') params = { 'user':{'loginName':username, 'domain.name':domainname}, 'credential':{'method':'OTPoD', 'otp':otp} } r=self.auth.execute("auth/verify", params) |
...