How to set temporary emergency access through RSA Mobile Admin API
Originally Published: 2004-05-04
Last Modified: 2023-09-22
Article Number
000060381
Applies To
RSA Mobile 1.5 Authentication Server
Microsoft Windows 2000 Advanced Server SP4
Issue
How to set temporary emergency access through RSA Mobile Admin API
Cause
There is currently insufficient documentation to explain how this functionality is accessed through the Admin API
Resolution
The following code fragment shows how temporary access is enabled for an existing user:
    // set temporary access for 5 hours
    MobileIDUser mobUser;
    long startTime=Date.getTime();
    long endTime=startTime + (5 * 1000 * 60 * 60 ) ;
    String tempCode="123456""
    .....
    // instantiate mobUser to an existing object
    ....
    mobUser.setEmergencyAccessStartTime(startTime);
    mobUser.setEmergencyAccessEndTime(endTime);
    mobUser.setEmergencyAccessCode(tempCode);

Setting non-zero values for the start and end times for emergency access has the implicit action of 'turning on' emergency access for the specified time period. Then the act of setting non-zero values with the two methods will "turn on" temporary access", hence:

    mobUser.setEmergencyAccessStartTime(0);
    mobUser.setEmergencyAccessEndTime(0);

It is the programmers responsibility to ensure that valid time/date values are supplied.