CT-KIP activation using Admin API does not display the tokens as activated on Self-service portal
3 years ago
Originally Published: 2014-08-18
Article Number
000049789
Applies To
CT-KIP
RSA Authentication Manager 8.1
Issue
CT-KIP activation using Admin API does not display the tokens as activated on Self-service portal
Modified script looks like below:

 

 

private void distributeCTKIP(TokenDTO token, String inProfile, String inActCode)

                  throws InsufficientPrivilegeException, ConcurrentUpdateException, DataNotFoundException, Exception,

                  InvalidArgumentException, DuplicateDataException, ObjectInUseException, CommandException, SystemException{

            String swtProGuid = getSWTProfileGuid(inProfile);

            String tsn = token.getSerialNumber();

            setSwtProfile(token, swtProGuid);

            // GET TOKENDTO AGAIN

            LookupTokenCommand ltc = new LookupTokenCommand();

            ltc.setSerialNumber(tsn);  // need token serial number

            ltc.execute();

            TokenDTO NewToken = ltc.getToken(); new token copy

            token = null;

        ltc.reset();

            //

            setCTKIPActCode(NewToken, inActCode);

            getCTKIPActCode(NewToken, inActCode);

      }

 

private void setCTKIPActCode(TokenDTO token, String inActCode)

                  throws InsufficientPrivilegeException, ConcurrentUpdateException, DataNotFoundException,

                  InvalidArgumentException, DuplicateDataException, ObjectInUseException, CommandException, SystemException{

            CTKIPActivationCodeDTO ctkip = new CTKIPActivationCodeDTO();

            ctkip.setTokenSerialNum(token.getSerialNumber());

            ctkip.setActivationCode(inActCode); 

            token.setCtkipActivationCodeDTO(ctkip);

            //token.setRowVersion(token.getRowVersion()+1); token this out

            UpdateTokenCommand updateTok = new UpdateTokenCommand();

            updateTok.setToken(token);

 

            updateTok.execute();

      }