Package org.ejbca.core.model.ra

Examples of org.ejbca.core.model.ra.UsernameGenerator


          }
          return CmpMessageHelper.createUnprotectedErrorMessage(msg, ResponseStatus.FAILURE, FailInfo.BAD_MESSAGE_CHECK, errMsg);
        }
      }
      // Create a username and password and register the new user in EJBCA
      final UsernameGenerator gen = UsernameGenerator.getInstance(this.usernameGenParams);
      // Don't convert this DN to an ordered EJBCA DN string with CertTools.stringToBCDNString because we don't want double escaping of some characters
      final IRequestMessage req =  this.extendedUserDataHandler!=null ? this.extendedUserDataHandler.processRequestMessage(crmfreq, certProfileName) : crmfreq;
      final X509Name dnname = req.getRequestX509Name();
      if (LOG.isDebugEnabled()) {
        LOG.debug("Creating username from base dn: "+dnname.toString());
      }
      final String username = gen.generateUsername(dnname.toString());
      final String pwd;
      if (StringUtils.equals(this.userPwdParams, "random")) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting 12 char random user password.");
        }
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.ra.UsernameGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.