use of edu.uiuc.ncsa.myproxy.oa4mp.client.storage.AssetProvider in project OA4MP by ncsa.
the class AbstractOA4MPService method requestCert.
/**
* A convenience method that allows for a map of additional parameters.
*
* @param identifier
* @param additionalParameters
* @return
*/
public OA4MPResponse requestCert(Identifier identifier, Map additionalParameters) {
if (additionalParameters == null) {
additionalParameters = new HashMap();
}
AssetProvider assetProvider = getEnvironment().getAssetProvider();
Asset asset = null;
if (identifier == null) {
// no id
asset = assetProvider.get(false);
} else {
asset = assetProvider.get(identifier);
}
OA4MPResponse response = requestCert(asset, additionalParameters);
asset.setPrivateKey(response.getPrivateKey());
asset.setRedirect(response.getRedirect());
getAssetStore().save(asset);
return response;
}
Aggregations