Get Java Auth API sample code to authenticate consistently with 'Requires Name Lock' enabled
Originally Published: 2008-01-16
Article Number
Issue
With "Requires Name Lock" disabled, the SecurID Java Authentication SDK sample code authenticates successfully.
With "Requires Name Lock" enabled, authentications may now fail with "ACCESS DENIED, name lock required" logged at the Authentication Manager.
Cause
The sample code then prompts for a passcode and sends it to the Auth Manager once entered by the user.
If > 30 seconds have elapsed since the name lock was accepted by the Authentication Manager the name lock will have expired and the ACCESS DENIED error message above will be seen in the Auth Manager activity log.
Resolution
...
private void auth() throws Exception
{
String userName;
String passCode;
AuthSession session;
session = api.createUserSession();
userName = io.input("Username: ");
int authStatus = AuthSession.ACCESS_DENIED;
for (int i = 0; i < 3 && authStatus != AuthSession.ACCESS_OK; i++)
{
//don?t do the lock yet
//authStatus = session.lock(userName);
passCode = io.input("Passcode: ");
//have everything?now do name lock and send passcode
authStatus = session.lock(userName);
authStatus = session.check(userName, passCode);
authStatus = finalizeAuth(authStatus, session);
switch (authStatus)
?
Related Articles
AFX failure when Proxy is enabled without defining Proxy Host or Port values in RSA Governance & Lifecycle 142Number of Views RSA Identity Governance & Lifecycle Entitlements Data Collector (EDC) failure EC[31002] 112Number of Views How to capture packets (pcap) using SilverTap for RSA Web Threat Detection 58Number of Views System.OutOfMemoryException: Insufficient memory to continue the execution of the program. 26Number of Views Error message "Error: java.lang.IllegalArgumentException: Window boundary must be positive" in the RSA SecurID Authenticat… 120Number of Views
Trending Articles
Download RSA SecurID Access Cloud User Event audit logs using Cloud Administration REST API CLU RSA Authentication Manager 8.9 Release Notes (January 2026) AFX Server Fails to Start with 'Could Not Build a Validated Path' and 'Timed Out Waiting for AFX Applications to Start' in… AFX Server stuck in 'Not running' State, with error 'timed out waiting for AFX applications to start' Quick Setup Guide - Passwordless Authentication in Windows MFA Agent for Active Directory
Don't see what you're looking for?