Beispiel #1
0
import sys
import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = {
    'username': '******',
    'type': 'SMS',
    'pairingData': '972521234567',
}

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/offlinepairing/do', req_body)
#print(response_body)
import pingid
import sys

PROPERTIES_FILE = './pingid.properties'

req_body = {
    'userName': sys.argv[1],
}

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/suspenduser/do', req_body)
Beispiel #3
0
import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = {
   'getSameDeviceUsers':'false',
   'userName': '******',
  }

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/getuserdetails/do', req_body)
#print(response_body)
import pingid
import os

PROPERTIES_FILE = 'pingid.properties'
org_report_file = "orgReport.csv"

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)

""" User Management API: Create Job """
print("Calling Create Job...")
create_job_body = {'jobType': "USER_REPORTS"}
create_job_response = pingid.call('rest/4/createjob/do', create_job_body)
job_token = create_job_response['responseBody']['jobToken']

""" User Management API: Get Job Status"""
job_status_body = {'jobToken': job_token}
job_status_response = 'PENDING'
while job_status_response != 'DONE':
    job_status_response = pingid.call('rest/4/getjobstatus/do', job_status_body)['responseBody']['jobResult']['status']
    print(job_status_response)
    if job_status_response == 'FAILURE':
        print('Something went wrong...')
        exit()

""" User Mangement API: Get Organization Report """
print("Calling Get Org Report...")
org_report_body = {'fileType': "CSV"}
org_report_response = pingid.call('rest/4/getorgreport/do', org_report_body)

""" Writing report to CSV """
print(f"Creating {org_report_file}...")
Beispiel #5
0
#uses commandline arguments to accept the name of the user and the activation status.
#args[1]: argument 1 = activationStatus.
#args[2]: argument 2 = UserName.

import pingid
import sys

PROPERTIES_FILE = './pingid.properties'

req_body = {
    'activateUser': sys.argv[1],
    'role': 'REGULAR',
    'userName': sys.argv[2],
}

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/adduser/do', req_body)
import pingid
import sys

PROPERTIES_FILE = './pingid.properties'

req_body = {
   'userName': sys.argv[1],
  }

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/deleteuser/do', req_body)
import sys
import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = {
   'spAlias': 'web',
   'userName': '******',
   'sessionId':'...', // required
    'otp':'...', // required
  }

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/authoffline/do', req_body)
Beispiel #8
0
import sys
import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = {
    'userName': '******',
}

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/getactivationcode/do', req_body)
import sys
import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = {
   'spAlias': 'web',
   'userName': '******',
  }

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True)
response_body = pingid.call('rest/4/startauthentication/do', req_body)