Search in sources :

Example 1 with RecoverRequestType

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;
}
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)

Example 2 with RecoverRequestType

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);
}
Also used : 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) RecoverRequestType(org.apache.cxf.xkms.model.xkms.RecoverRequestType) Test(org.junit.Test)

Example 3 with RecoverRequestType

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);
}
Also used : 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) RecoverRequestType(org.apache.cxf.xkms.model.xkms.RecoverRequestType) Test(org.junit.Test)

Aggregations

RecoverRequestType (org.apache.cxf.xkms.model.xkms.RecoverRequestType)3 RecoverResultType (org.apache.cxf.xkms.model.xkms.RecoverResultType)3 RegisterResultType (org.apache.cxf.xkms.model.xkms.RegisterResultType)3 ReissueResultType (org.apache.cxf.xkms.model.xkms.ReissueResultType)3 RevokeResultType (org.apache.cxf.xkms.model.xkms.RevokeResultType)3 ResultType (org.apache.cxf.xkms.model.xkms.ResultType)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 Register (org.apache.cxf.xkms.handlers.Register)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 RevokeRequestType (org.apache.cxf.xkms.model.xkms.RevokeRequestType)1