use of org.apache.cxf.xkms.model.xkms.RecoverRequestType in project cxf by apache.
the class CheckXKRSS method createXKMSService.
XKMSService createXKMSService(boolean enableXKRSS) {
XKMSService xkmsService = new XKMSService();
List<Register> keyRegisterHandlers = new ArrayList<>();
keyRegisterHandlers.add(new Register() {
@Override
public RevokeResultType revoke(RevokeRequestType request, RevokeResultType response) {
return response;
}
@Override
public ReissueResultType reissue(ReissueRequestType request, ReissueResultType response) {
return response;
}
@Override
public RegisterResultType register(RegisterRequestType request, RegisterResultType response) {
return response;
}
@Override
public boolean canProcess(RequestAbstractType request) {
return true;
}
@Override
public RecoverResultType recover(RecoverRequestType request, RecoverResultType response) {
return response;
}
});
xkmsService.setKeyRegisterHandlers(keyRegisterHandlers);
xkmsService.setEnableXKRSS(enableXKRSS);
return xkmsService;
}
use of org.apache.cxf.xkms.model.xkms.RecoverRequestType in project cxf by apache.
the class CheckXKRSS method checkRecoverWithXKRSS.
@Test
public void checkRecoverWithXKRSS() {
RecoverRequestType request = new RecoverRequestType();
request.setId("1");
request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
ResultType result = createXKMSService(true).recover(request);
showResult(result);
assertSuccess(result);
}
use of org.apache.cxf.xkms.model.xkms.RecoverRequestType in project cxf by apache.
the class CheckXKRSS method checkRecoverWithoutXKRSS.
@Test
public void checkRecoverWithoutXKRSS() {
RecoverRequestType request = new RecoverRequestType();
request.setId("1");
request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
ResultType result = createXKMSService(false).recover(request);
assertNotSupported(result);
}
Aggregations