use of org.apache.cxf.xkms.model.xkms.RevokeResultType in project cxf by apache.
the class XKMSService method revoke.
@Override
public RevokeResultType revoke(RevokeRequestType request) {
RevokeResultType response = XKMSResponseFactory.createResponse(request, new RevokeResultType());
try {
assertXKRSSAllowed();
validateRequest(request);
for (Register handler : keyRegisterHandlers) {
if (handler.canProcess(request)) {
return handler.revoke(request, response);
}
}
throw new UnsupportedOperationException("Service was unable to handle your request");
} catch (Exception e) {
return handleException("revoke", e, response);
}
}
use of org.apache.cxf.xkms.model.xkms.RevokeResultType 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;
}
Aggregations