Search in sources :

Example 1 with RevokeRequestType

use of org.apache.cxf.xkms.model.xkms.RevokeRequestType in project cxf by apache.

the class CheckXKRSS method checkRevokeWithoutXKRSS.

@Test
public void checkRevokeWithoutXKRSS() {
    RevokeRequestType request = new RevokeRequestType();
    request.setId("1");
    request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
    ResultType result = createXKMSService(false).revoke(request);
    assertNotSupported(result);
}
Also used : RevokeRequestType(org.apache.cxf.xkms.model.xkms.RevokeRequestType) RecoverResultType(org.apache.cxf.xkms.model.xkms.RecoverResultType) ResultType(org.apache.cxf.xkms.model.xkms.ResultType) ReissueResultType(org.apache.cxf.xkms.model.xkms.ReissueResultType) RevokeResultType(org.apache.cxf.xkms.model.xkms.RevokeResultType) RegisterResultType(org.apache.cxf.xkms.model.xkms.RegisterResultType) Test(org.junit.Test)

Example 2 with RevokeRequestType

use of org.apache.cxf.xkms.model.xkms.RevokeRequestType 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;
}
Also used : RegisterResultType(org.apache.cxf.xkms.model.xkms.RegisterResultType) ReissueResultType(org.apache.cxf.xkms.model.xkms.ReissueResultType) RegisterRequestType(org.apache.cxf.xkms.model.xkms.RegisterRequestType) ArrayList(java.util.ArrayList) RecoverRequestType(org.apache.cxf.xkms.model.xkms.RecoverRequestType) RevokeRequestType(org.apache.cxf.xkms.model.xkms.RevokeRequestType) RecoverResultType(org.apache.cxf.xkms.model.xkms.RecoverResultType) Register(org.apache.cxf.xkms.handlers.Register) RevokeResultType(org.apache.cxf.xkms.model.xkms.RevokeResultType) ReissueRequestType(org.apache.cxf.xkms.model.xkms.ReissueRequestType) RequestAbstractType(org.apache.cxf.xkms.model.xkms.RequestAbstractType)

Aggregations

RecoverResultType (org.apache.cxf.xkms.model.xkms.RecoverResultType)2 RegisterResultType (org.apache.cxf.xkms.model.xkms.RegisterResultType)2 ReissueResultType (org.apache.cxf.xkms.model.xkms.ReissueResultType)2 RevokeRequestType (org.apache.cxf.xkms.model.xkms.RevokeRequestType)2 RevokeResultType (org.apache.cxf.xkms.model.xkms.RevokeResultType)2 ArrayList (java.util.ArrayList)1 Register (org.apache.cxf.xkms.handlers.Register)1 RecoverRequestType (org.apache.cxf.xkms.model.xkms.RecoverRequestType)1 RegisterRequestType (org.apache.cxf.xkms.model.xkms.RegisterRequestType)1 ReissueRequestType (org.apache.cxf.xkms.model.xkms.ReissueRequestType)1 RequestAbstractType (org.apache.cxf.xkms.model.xkms.RequestAbstractType)1 ResultType (org.apache.cxf.xkms.model.xkms.ResultType)1 Test (org.junit.Test)1