}
return config;
}
public void init() throws IdentityProviderException, NumberFormatException, IdentityException, CarbonException {
IdentityPersistenceManager admin = IdentityPersistenceManager.getPersistanceManager();
ServerConfiguration serverConf = ServerConfiguration.getInstance();
String hostName = serverConf.getFirstProperty("HostName");
if (hostName == null) {
hostName = "localhost";
}
issuer = "http://" + hostName;
String param = null;
param = admin.getParameterValue(IdentityTenantUtil.getRegistry(),IdentityConstants.PARAM_VALID_PERIOD);
if (param == null) {
addParameters(IdentityTenantUtil.getRegistry());
validPeriod = Integer.parseInt(admin.getParameterValue(AdminServicesUtil
.getSystemRegistry(), IdentityConstants.PARAM_VALID_PERIOD));
} else {
validPeriod = Integer.parseInt(param);
}
cardName = admin.getParameterValue(IdentityTenantUtil.getRegistry(),
IdentityConstants.PARAM_CARD_NAME);
String types = admin.getParameterValue(IdentityTenantUtil.getRegistry(),
IdentityConstants.PARAM_SUPPORTED_TOKEN_TYPES);
String[] arrTypes = types.split(",");
tokenTypeList = new SupportedTokenTypeList();
for (int i = 0; i < arrTypes.length; i++) {
tokenTypeList.addSupportedTokenType(arrTypes[i]);
}
useSymmetricBinding = "true".equals(admin.getParameter(IdentityTenantUtil.getRegistry(),
IdentityConstants.PARAM_USE_SYMM_BINDING).getValue());
}