if (StringUtils.isEmpty(consumerKey)) {
consumerKey = tokenGen
.generate((principal.getName() + clientApp.getClientName()).getBytes("UTF-8"));
}
String secretKey = tokenGen.generate(new SecureRandom().generateSeed(20));
Client clientInfo =
new Client(consumerKey, secretKey, clientApp.getClientName(), null);
clientInfo.setCallbackURI(clientApp.getCallbackURL());
clientInfo.setLoginName(principal.getName());