Search in sources :

Example 1 with DeleteLoginConfigRequest

use of com.novell.security.nmas.jndi.ldap.ext.DeleteLoginConfigRequest in project ldapchai by ldapchai.

the class NmasCrFactory method clearResponseSet.

public static void clearResponseSet(final ChaiUser theUser) throws ChaiUnavailableException, ChaiOperationException {
    final ChaiProvider provider = theUser.getChaiProvider();
    final DeleteLoginConfigRequest request = new DeleteLoginConfigRequest();
    request.setObjectDN(theUser.getEntryDN());
    request.setTag("ChallengeResponseQuestions");
    request.setMethodID(NMASChallengeResponse.METHOD_ID);
    request.setMethodIDLen(NMASChallengeResponse.METHOD_ID.length * 4);
    final DeleteLoginConfigResponse response = (DeleteLoginConfigResponse) provider.extendedOperation(request);
    if (response != null && response.getNmasRetCode() != 0) {
        final String errorMsg = "nmas error clearing loginResponseConfig: " + response.getNmasRetCode();
        LOGGER.debug(errorMsg);
        throw new ChaiOperationException(errorMsg, ChaiError.UNKNOWN);
    }
}
Also used : ChaiProvider(com.novell.ldapchai.provider.ChaiProvider) DeleteLoginConfigRequest(com.novell.security.nmas.jndi.ldap.ext.DeleteLoginConfigRequest) ChaiOperationException(com.novell.ldapchai.exception.ChaiOperationException) DeleteLoginConfigResponse(com.novell.security.nmas.jndi.ldap.ext.DeleteLoginConfigResponse)

Aggregations

ChaiOperationException (com.novell.ldapchai.exception.ChaiOperationException)1 ChaiProvider (com.novell.ldapchai.provider.ChaiProvider)1 DeleteLoginConfigRequest (com.novell.security.nmas.jndi.ldap.ext.DeleteLoginConfigRequest)1 DeleteLoginConfigResponse (com.novell.security.nmas.jndi.ldap.ext.DeleteLoginConfigResponse)1