Class CredManagementPayloadParser
- java.lang.Object
-
- org.certificateservices.messages.csmessages.BasePayloadParser
-
- org.certificateservices.messages.credmanagement.CredManagementPayloadParser
-
- All Implemented Interfaces:
PayloadParser
public class CredManagementPayloadParser extends BasePayloadParser
Payload Parser for generating Credential Management messages according to credmanagement_schema2_0.xsd
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCREDMANAGEMENT_XSD_SCHEMA_2_0_RESOURCE_LOCATIONstatic java.lang.StringCREDMANAGEMENT_XSD_SCHEMA_2_1_RESOURCE_LOCATIONstatic java.lang.StringCREDMANAGEMENT_XSD_SCHEMA_2_2_RESOURCE_LOCATIONstatic java.lang.StringCREDMANAGEMENT_XSD_SCHEMA_2_3_RESOURCE_LOCATIONstatic java.lang.StringNAMESPACE-
Fields inherited from class org.certificateservices.messages.csmessages.BasePayloadParser
config, csMessageObjectFactory, customCSMessageParser, payloadVersion, secProv
-
-
Constructor Summary
Constructors Constructor Description CredManagementPayloadParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]genAutomaticRenewCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, AutomationLevel automationLevel, java.util.List<byte[]> renewalRequestData, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a AutomaticRenewCredentialRequest to renew a given credential with an identical credential and used for automation steps.CSMessageResponseDatagenAutomaticRenewCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<AutomaticRenewCredentialResponse.RenewedCredential> renewedCredentials, java.util.List<java.lang.Object> assertions)Method to generate a AutomaticRenewalResponsebyte[]genChangeCredentialStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a ChangeCredentialStatusRequestCSMessageResponseDatagenChangeCredentialStatusResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String issuerId, java.lang.String serialNumber, int credentialStatus, java.lang.String reasonInformation, java.util.Date revocationDate, java.util.List<java.lang.Object> assertions)Method to generate a ChangeCredentialStatusResponsebyte[]genChangeTokenStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerialNumber, CredentialFilter credentialFilter, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a ChangeTokenStatusRequestCSMessageResponseDatagenChangeTokenStatusResponse(java.lang.String relatedEndEntity, CSMessage request, Token token, java.util.List<java.lang.Object> assertions)Method to generate a ChangeTokenStatusResponsebyte[]genChangeUserStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String userUniqueId, TokenFilter tokenFilter, CredentialFilter credentialFilter, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a ChangeUserStatusRequestCSMessageResponseDatagenChangeUserStatusResponse(java.lang.String relatedEndEntity, CSMessage request, User user, java.util.List<java.lang.Object> assertions)Method to generate a ChangeUserStatusResponsebyte[]genFetchHardTokenDataRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, Credential adminCredential, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a FetchHardTokenDataRequestCSMessageResponseDatagenFetchHardTokenDataResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String tokenSerial, byte[] encryptedData, java.util.List<java.lang.Object> assertions)Method to generate a FetchHardTokenDataResponsebyte[]genGetCredentialAvailableActionsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, java.lang.String locale, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialAvailableActionsRequest to get available renewal action available for a given certificate.CSMessageResponseDatagenGetCredentialAvailableActionsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<CredentialAvailableActionsOperation> operations, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialAvailableActionsResponsebyte[]genGetCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String credentialSubType, java.lang.String issuerId, java.lang.String serialNumber, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialRequestCSMessageResponseDatagenGetCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, Credential credential, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialResponsebyte[]genGetCredentialStatusListRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.Long serialNumber, java.lang.String credentialStatusListType, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialStatusListRequestCSMessageResponseDatagenGetCredentialStatusListResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialStatusList credentialStatusList, java.util.List<java.lang.Object> assertions)Method to generate a GetCredentialStatusListResponsebyte[]genGetIssuerCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetIssuerCredentialsRequestCSMessageResponseDatagenGetIssuerCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, Credential issuerCredential, java.util.List<java.lang.Object> assertions)Method to generate a GetIssuerCredentialsResponsebyte[]genGetTokensRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String serialNumber, boolean exactMatch, java.lang.Integer startIndex, java.lang.Integer resultSize, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetTokensRequest with pagination support (2.1)byte[]genGetTokensRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String serialNumber, boolean exactMatch, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetTokensRequest without pagination used in 2.0 protocolCSMessageResponseDatagenGetTokensResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Token> tokens, java.lang.Integer startIndex, java.lang.Integer totalMatching, java.util.List<java.lang.Object> assertions)Method to generate a GetTokensResponse used for pagination (pagination elements are only populated if request is 2.1 or aboveCSMessageResponseDatagenGetTokensResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Token> tokens, java.util.List<java.lang.Object> assertions)Method to generate a GetTokensResponse, used for 2.0 messages.byte[]genGetUsersRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String uniqueId, boolean exactMatch, java.lang.Integer startIndex, java.lang.Integer resultSize, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetUsersRequest with pagination support (2.1)byte[]genGetUsersRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String uniqueId, boolean exactMatch, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a GetUsersRequest without pagination used in 2.0 protocolCSMessageResponseDatagenGetUsersResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<User> users, java.lang.Integer startIndex, java.lang.Integer totalMatching, java.util.List<java.lang.Object> assertions)Method to generate a GetUsersResponse used for pagination (pagination elements are only populated if request is 2.1 or aboveCSMessageResponseDatagenGetUsersResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<User> users, java.util.List<java.lang.Object> assertions)Method to generate a GetUsersResponse, used for 2.0 messages.byte[]genIsIssuerRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a IsIssuerRequestCSMessageResponseDatagenIsIssuerResponse(java.lang.String relatedEndEntity, CSMessage request, boolean isIssuer, java.util.List<java.lang.Object> assertions)Method to generate a IsIssuerResponsebyte[]genIssueCredentialStatusListRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String credentialStatusListType, java.lang.Boolean force, java.util.Date requestedValidFromDate, java.util.Date requestedNotAfterDate, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a IssueCredentialStatusListRequestCSMessageResponseDatagenIssueCredentialStatusListResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialStatusList credentialStatusList, java.util.List<java.lang.Object> assertions)Method to generate a IssueCredentialStatusListResponseCSMessageResponseDatagenIssueCredentialStatusListResponseWithoutRequest(java.lang.String csMessageVersion, java.lang.String payLoadVersion, java.lang.String relatedEndEntity, java.lang.String destinationId, java.lang.String requestName, java.lang.String organisation, CredentialStatusList credentialStatusList, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a IssueCredentialStatusListResponse where there are no request, such as scheduled CRL issuing.byte[]genIssueTokenCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, TokenRequest tokenRequest, java.util.List<FieldValue> fieldValues, HardTokenData hardTokenData, java.util.List<RecoverableKey> recoverableKeys, Credential originator, java.util.List<java.lang.Object> assertions)Method to a IssueTokenCredentialRequest message and populating it with the tokenRequest.byte[]genIssueTokenCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, TokenRequest tokenRequest, java.util.List<FieldValue> fieldValues, HardTokenData hardTokenData, Credential originator, java.util.List<java.lang.Object> assertions)Method to a IssueTokenCredentialRequest message and populating it with the tokenRequest.CSMessageResponseDatagenIssueTokenCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Credential> credentials, java.util.List<Credential> revokedCredentials, java.util.List<java.lang.Object> assertions)Method to a IssueTokenCredentialResponse message and populating it with the tokenRequest and the generated responses.KeygenKey(Credential relatedCredential, byte[] encryptedKey)Help method to generate a Key structure consisting of a relatedCredential and an encryptedKey.RecoverableKeygenRecoverableKey(int relatedCredentialRequestId, byte[] encryptedKey)Help method to generate a RecoverableKey structure consisting of a relatedCredentialRequestId and an encryptedKey.byte[]genRecoverHardTokenRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, Credential adminCredential, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a RecoverHardTokenDataRequestCSMessageResponseDatagenRecoverHardTokenResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String tokenSerial, byte[] encryptedData, java.util.List<Key> keys, java.util.List<java.lang.Object> assertions)Method to generate a RecoverHardTokenResponsebyte[]genRecoverKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, Credential adminCredential, java.util.List<Credential> relatedCredentials, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a RecoverKeyRequestCSMessageResponseDatagenRecoverKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Key> keys, java.util.List<java.lang.Object> assertions)Method to generate a RecoverKeyResponsebyte[]genRemoveCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a RemoveCredentialRequestCSMessageResponseDatagenRemoveCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method to generate a RemoveCredentialResponsebyte[]genStoreHardTokenDataRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, byte[] encryptedData, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a StoreHardTokenDataRequestCSMessageResponseDatagenStoreHardTokenDataResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method to generate a StoreHardTokenDataResponsebyte[]genStoreKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.util.List<Key> keys, Credential originator, java.util.List<java.lang.Object> assertions)Method to generate a StoreKeyRequestCSMessageResponseDatagenStoreKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method to generate a StoreKeyResponseprotected java.lang.StringgetDefaultPayloadVersion()java.lang.StringgetJAXBPackage()Method that returns the JAXBPackage Name for the package name containing the JAXB classes.java.lang.StringgetNameSpace()java.io.InputStreamgetSchemaAsInputStream(java.lang.String payLoadVersion)Method that should return the location of the schema for a given payLoadVersion, it should be accessable as a class resource using getClass().getResourceAsStream()protected java.lang.String[]getSupportedVersions()-
Methods inherited from class org.certificateservices.messages.csmessages.BasePayloadParser
generateGetApprovalRequest, generateIsApprovedRequest, getAssertions, getCSMessageParser, getPayload, getPayloadVersion, getRelatedSchemas, getResponseStatus, init, init, isPayloadVersionSupported, parseMessage, parseMessage, parseMessage, setPayloadVersion
-
-
-
-
Field Detail
-
NAMESPACE
public static java.lang.String NAMESPACE
-
CREDMANAGEMENT_XSD_SCHEMA_2_0_RESOURCE_LOCATION
public static final java.lang.String CREDMANAGEMENT_XSD_SCHEMA_2_0_RESOURCE_LOCATION
- See Also:
- Constant Field Values
-
CREDMANAGEMENT_XSD_SCHEMA_2_1_RESOURCE_LOCATION
public static final java.lang.String CREDMANAGEMENT_XSD_SCHEMA_2_1_RESOURCE_LOCATION
- See Also:
- Constant Field Values
-
CREDMANAGEMENT_XSD_SCHEMA_2_2_RESOURCE_LOCATION
public static final java.lang.String CREDMANAGEMENT_XSD_SCHEMA_2_2_RESOURCE_LOCATION
- See Also:
- Constant Field Values
-
CREDMANAGEMENT_XSD_SCHEMA_2_3_RESOURCE_LOCATION
public static final java.lang.String CREDMANAGEMENT_XSD_SCHEMA_2_3_RESOURCE_LOCATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getJAXBPackage
public java.lang.String getJAXBPackage()
Description copied from interface:PayloadParserMethod that returns the JAXBPackage Name for the package name containing the JAXB classes. For multiple package names use a ':' without spaces.- See Also:
PayloadParser.getJAXBPackage()
-
getNameSpace
public java.lang.String getNameSpace()
- Returns:
- the related pay load elements unique name space.
- See Also:
PayloadParser.getNameSpace()
-
getSchemaAsInputStream
public java.io.InputStream getSchemaAsInputStream(java.lang.String payLoadVersion) throws MessageContentException, MessageProcessingExceptionDescription copied from interface:PayloadParserMethod that should return the location of the schema for a given payLoadVersion, it should be accessable as a class resource using getClass().getResourceAsStream()- Throws:
MessageContentException- if given version isn't supported.MessageProcessingException- if problems occurred setting up the stream.- See Also:
PayloadParser.getSchemaAsInputStream(String)
-
getSupportedVersions
protected java.lang.String[] getSupportedVersions()
- Specified by:
getSupportedVersionsin classBasePayloadParser- Returns:
- an array of version numbers of payload that is supported by this parser.
- See Also:
BasePayloadParser.getSupportedVersions()
-
getDefaultPayloadVersion
protected java.lang.String getDefaultPayloadVersion()
- Specified by:
getDefaultPayloadVersionin classBasePayloadParser- Returns:
- returns the payload version used by default when generating request messages.
- See Also:
BasePayloadParser.getDefaultPayloadVersion()
-
genIssueTokenCredentialsRequest
public byte[] genIssueTokenCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, TokenRequest tokenRequest, java.util.List<FieldValue> fieldValues, HardTokenData hardTokenData, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to a IssueTokenCredentialRequest message and populating it with the tokenRequest.- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenRequest- the tokenRequest to add to the CSRequest.fieldValues- containing complementary input data to the request. Can be null if no complementary data is available.hardTokenData- related hard token data to be stored in encrypted storage. Null if not applicableoriginator- the original requester of a message, null if not applicableassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- generated and signed CSMessage in byte[] format.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIssueTokenCredentialsRequest
public byte[] genIssueTokenCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, TokenRequest tokenRequest, java.util.List<FieldValue> fieldValues, HardTokenData hardTokenData, java.util.List<RecoverableKey> recoverableKeys, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to a IssueTokenCredentialRequest message and populating it with the tokenRequest.- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenRequest- the tokenRequest to add to the CSRequest.fieldValues- containing complementary input data to the request. Can be null if no complementary data is available.hardTokenData- related hard token data to be stored in encrypted storage. Null if not applicablerecoverableKeys- a list of keys that should be stored in backed for later recovery in case token is lost.originator- the original requester of a message, null if not applicableassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- generated and signed CSMessage in byte[] format.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIssueTokenCredentialsResponse
public CSMessageResponseData genIssueTokenCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Credential> credentials, java.util.List<Credential> revokedCredentials, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to a IssueTokenCredentialResponse message and populating it with the tokenRequest and the generated responses.- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withcredentials- the credentials to populate the response with.revokedCredentials- credentials revoked in the operation or null, if no credentials where revoked.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeCredentialStatusRequest
public byte[] genChangeCredentialStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a ChangeCredentialStatusRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The serial number of the credential in hexadecimal encoding lowercase (for X509 certificates).newCredentialStatus- The new credential status to set.reasonInformation- More detailed information about the revocation statusoriginator- the original requester of a message, null if not applicableassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeCredentialStatusResponse
public CSMessageResponseData genChangeCredentialStatusResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String issuerId, java.lang.String serialNumber, int credentialStatus, java.lang.String reasonInformation, java.util.Date revocationDate, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a ChangeCredentialStatusResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withissuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The serial number of the credential in hexadecimal encoding lowercase (for X509 certificates).credentialStatus- the resulted credential status of the requestreasonInformation- More detailed information about the revocation statusrevocationDate- the timestamp when the credential was revoked.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeUserStatusRequest
public byte[] genChangeUserStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String userUniqueId, TokenFilter tokenFilter, CredentialFilter credentialFilter, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a ChangeUserStatusRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationuserUniqueId- The unique id of the user to revoke credentials for.tokenFilter- The token filter specifying a filter for a which credentials in the users token that should be revoked. Optional if null is all credentials for all tokens revoked (matching credential filter).credentialFilter- The credential filter used to specify which matching credentials that should be revoked. Optional if null is all credentials for all tokens revoked (matching optional token filter).newCredentialStatus- The new credential status to set.reasonInformation- More detailed information about the revocation statusoriginator- the original requester of a message, null if not applicableassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeUserStatusResponse
public CSMessageResponseData genChangeUserStatusResponse(java.lang.String relatedEndEntity, CSMessage request, User user, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a ChangeUserStatusResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withuser- The related user with updated token and credential information.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeTokenStatusRequest
public byte[] genChangeTokenStatusRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerialNumber, CredentialFilter credentialFilter, int newCredentialStatus, java.lang.String reasonInformation, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a ChangeTokenStatusRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenSerialNumber- The unique serial number within the organisation.credentialFilter- The credential filter used to specify which matching credentials that should be revoked. Optional if null is all credentials for all tokens revoked (matching optional token filter).newCredentialStatus- The new credential status to set.reasonInformation- More detailed information about the revocation statusoriginator- the original requester of a message, null if not applicableassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genChangeTokenStatusResponse
public CSMessageResponseData genChangeTokenStatusResponse(java.lang.String relatedEndEntity, CSMessage request, Token token, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a ChangeTokenStatusResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withtoken- The related token with updated credential information.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialRequest
public byte[] genGetCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String credentialSubType, java.lang.String issuerId, java.lang.String serialNumber, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetCredentialRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationcredentialSubType- the credential sub type of the credential.issuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The serial number of the credential in hexadecimal encoding lowercase (for X509 certificates).originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialResponse
public CSMessageResponseData genGetCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, Credential credential, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetCredentialResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withcredential- the matching credential of the issued id and serial numberassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialStatusListRequest
public byte[] genGetCredentialStatusListRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.Long serialNumber, java.lang.String credentialStatusListType, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetCredentialStatusListRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The number of the credential status list in the request (Optional)credentialStatusListType- The type of status list to fetchoriginator- the original requester of a message, null if not applicable.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialStatusListResponse
public CSMessageResponseData genGetCredentialStatusListResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialStatusList credentialStatusList, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetCredentialStatusListResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withcredentialStatusList- the matching credential status listassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetIssuerCredentialsRequest
public byte[] genGetIssuerCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetIssuerCredentialsRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetIssuerCredentialsResponse
public CSMessageResponseData genGetIssuerCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, Credential issuerCredential, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetIssuerCredentialsResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withissuerCredential- the issuers credentialassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIsIssuerRequest
public byte[] genIsIssuerRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a IsIssuerRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIsIssuerResponse
public CSMessageResponseData genIsIssuerResponse(java.lang.String relatedEndEntity, CSMessage request, boolean isIssuer, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a IsIssuerResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withisIssuer- indicating if current server is issuer or notassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIssueCredentialStatusListRequest
public byte[] genIssueCredentialStatusListRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String credentialStatusListType, java.lang.Boolean force, java.util.Date requestedValidFromDate, java.util.Date requestedNotAfterDate, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a IssueCredentialStatusListRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.credentialStatusListType- The type of status list to fetchoriginator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentExceptionMessageProcessingException
-
genIssueCredentialStatusListResponse
public CSMessageResponseData genIssueCredentialStatusListResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialStatusList credentialStatusList, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a IssueCredentialStatusListResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withcredentialStatusList- the new credential status listassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genIssueCredentialStatusListResponseWithoutRequest
public CSMessageResponseData genIssueCredentialStatusListResponseWithoutRequest(java.lang.String csMessageVersion, java.lang.String payLoadVersion, java.lang.String relatedEndEntity, java.lang.String destinationId, java.lang.String requestName, java.lang.String organisation, CredentialStatusList credentialStatusList, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a IssueCredentialStatusListResponse where there are no request, such as scheduled CRL issuing.- Parameters:
csMessageVersion- the version of the CS Message Core protocol.payLoadVersion- the version of the credential management pay load protocol.relatedEndEntity- the name of the related end entity (such as username of the related user)destinationId- the destination of the response set in the CS message.requestName- the name of the request message this response whould normally reply to.organisation- the organisation set in the response message.credentialStatusList- the new credential status listoriginator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRemoveCredentialRequest
public byte[] genRemoveCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a RemoveCredentialRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The serial number of the credential in hexadecimal encoding lowercase (for X509 certificates).originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRemoveCredentialResponse
public CSMessageResponseData genRemoveCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a RemoveCredentialResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request to populate the response withassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genFetchHardTokenDataRequest
public byte[] genFetchHardTokenDataRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, Credential adminCredential, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a FetchHardTokenDataRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenSerial- The unique serial number of the hard token within the organisationrelatedCredentialIssuerId- The unique id of the issuer of the related credential, usually the subject DN name of the issuer.adminCredential- the credential of the requesting card administrator that need the hard token data. The response data is encrypted with this administrator as recipient.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genFetchHardTokenDataResponse
public CSMessageResponseData genFetchHardTokenDataResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String tokenSerial, byte[] encryptedData, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a FetchHardTokenDataResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.tokenSerial- The unique serial number of the hard token within the organisation.encryptedData- The token data encrypted with the token administrators credential sent in the request.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRecoverHardTokenRequest
public byte[] genRecoverHardTokenRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, Credential adminCredential, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a RecoverHardTokenDataRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenSerial- The unique serial number of the hard token within the organisationrelatedCredentialIssuerId- The unique id of the issuer of the related credential, usually the subject DN name of the issuer.adminCredential- the credential of the requesting card administrator that need the hard token data. The response data is encrypted with this administrator as recipient.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRecoverHardTokenResponse
public CSMessageResponseData genRecoverHardTokenResponse(java.lang.String relatedEndEntity, CSMessage request, java.lang.String tokenSerial, byte[] encryptedData, java.util.List<Key> keys, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a RecoverHardTokenResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.tokenSerial- The unique serial number of the hard token within the organisation.encryptedData- The token data encrypted with the token administrators credential sent in the request.keys- list of encrypted keys recovered from frontend system.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genStoreHardTokenDataRequest
public byte[] genStoreHardTokenDataRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String tokenSerial, java.lang.String relatedCredentialIssuerId, byte[] encryptedData, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a StoreHardTokenDataRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationtokenSerial- The unique serial number of the hard token within the organisationrelatedCredentialIssuerId- The unique id of the issuer of the related credential, usually the subject DN name of the issuer.encryptedData- The token data encrypted with a credential provided out-of-bands by the CS administrator to protect the data during transport.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genStoreHardTokenDataResponse
public CSMessageResponseData genStoreHardTokenDataResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a StoreHardTokenDataResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetTokensRequest
public byte[] genGetTokensRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String serialNumber, boolean exactMatch, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetTokensRequest without pagination used in 2.0 protocol- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationserialNumber- The unique serial number of the hard token within the organisation, complete or part of the serial numberexactMatch- If only exactly matching tokens should be fetched.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetTokensRequest
public byte[] genGetTokensRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String serialNumber, boolean exactMatch, java.lang.Integer startIndex, java.lang.Integer resultSize, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetTokensRequest with pagination support (2.1)- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationserialNumber- The unique serial number of the hard token within the organisation, complete or part of the serial numberexactMatch- If only exactly matching tokens should be fetched.startIndex- the index to fetch the resulting user data.resultSize- the maximum number of entries to return, should not be larger that the maximum setting in server.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetTokensResponse
public CSMessageResponseData genGetTokensResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Token> tokens, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetTokensResponse, used for 2.0 messages.- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.tokens- a list of matching tokens, never null.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetTokensResponse
public CSMessageResponseData genGetTokensResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Token> tokens, java.lang.Integer startIndex, java.lang.Integer totalMatching, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetTokensResponse used for pagination (pagination elements are only populated if request is 2.1 or above- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.tokens- a list of matching tokens, never null.startIndex- the start index of the page in the result set. Is only set if request is 2.1 or abovetotalMatching- the total matching users in query. Is only set if request is 2.1 or aboveassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetUsersRequest
public byte[] genGetUsersRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String uniqueId, boolean exactMatch, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetUsersRequest without pagination used in 2.0 protocol- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationuniqueId- The unique id of the user within the organisation, complete or part of the unique id to search forexactMatch- If only exactly matching tokens should be fetched.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetUsersRequest
public byte[] genGetUsersRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String uniqueId, boolean exactMatch, java.lang.Integer startIndex, java.lang.Integer resultSize, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetUsersRequest with pagination support (2.1)- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationuniqueId- The unique id of the user within the organisation, complete or part of the unique id to search forexactMatch- If only exactly matching tokens should be fetched.startIndex- the index to fetch the resulting user data.resultSize- the maximum number of entries to return, should not be larger that the maximum setting in server.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetUsersResponse
public CSMessageResponseData genGetUsersResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<User> users, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetUsersResponse, used for 2.0 messages.- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.users- a list of matching users, never null.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetUsersResponse
public CSMessageResponseData genGetUsersResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<User> users, java.lang.Integer startIndex, java.lang.Integer totalMatching, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetUsersResponse used for pagination (pagination elements are only populated if request is 2.1 or above- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.users- a list of matching users, never null.startIndex- the start index of the page in the result set. Is only set if request is 2.1 or abovetotalMatching- the total matching users in query. Is only set if request is 2.1 or aboveassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRecoverKeyRequest
public byte[] genRecoverKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, Credential adminCredential, java.util.List<Credential> relatedCredentials, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a RecoverKeyRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationadminCredential- the admin credential to encrypt the key store data to.relatedCredentials- the credentials pointing out which keys should be recovered from frontend store.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genRecoverKeyResponse
public CSMessageResponseData genRecoverKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<Key> keys, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a RecoverKeyResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.keys- a list of recovered keys, never null.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genStoreKeyRequest
public byte[] genStoreKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.util.List<Key> keys, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a StoreKeyRequest- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationkeys- a list en encrypted keys to store in frontend system.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genStoreKeyResponse
public CSMessageResponseData genStoreKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a StoreKeyResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialAvailableActionsRequest
public byte[] genGetCredentialAvailableActionsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String issuerId, java.lang.String serialNumber, java.lang.String locale, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a GetCredentialAvailableActionsRequest to get available renewal action available for a given certificate.- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationissuerId- The unique id of the issuer, usually the subject DN name of the issuer.serialNumber- The serial number of the credential in hexadecimal encoding lowercase (for X509 certificates).locale- the locale in BCP 47 string, i.e en or en_GB or se_SVoriginator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genGetCredentialAvailableActionsResponse
public CSMessageResponseData genGetCredentialAvailableActionsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<CredentialAvailableActionsOperation> operations, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a GetCredentialAvailableActionsResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.operations- a list of operations that is available for a given credential when renewing.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genAutomaticRenewCredentialRequest
public byte[] genAutomaticRenewCredentialRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, AutomationLevel automationLevel, java.util.List<byte[]> renewalRequestData, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod to generate a AutomaticRenewCredentialRequest to renew a given credential with an identical credential and used for automation steps.- Parameters:
requestId- the id of the requestdestinationId- the destinationId used in the CSMessage.organisation- the related organisationautomationLevel- The level of automation, AUTOMATIC if requesting system updates automatically, or MANUAL of manual steps needs to be taked for renewalrenewalRequestData- A list of request data. The request data is PKCS7 of PKCS10 data signed with original certificate.originator- the original requester of a message, null if not applicable.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genAutomaticRenewCredentialResponse
public CSMessageResponseData genAutomaticRenewCredentialResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<AutomaticRenewCredentialResponse.RenewedCredential> renewedCredentials, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method to generate a AutomaticRenewalResponse- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the request this message is a response to.renewedCredentials- a list of renewed credential with a reference to the unique id of the original credential.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated message.
- Throws:
MessageContentException- if CS message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the CSMessage
-
genKey
public Key genKey(Credential relatedCredential, byte[] encryptedKey)
Help method to generate a Key structure consisting of a relatedCredential and an encryptedKey.- Parameters:
relatedCredential- the related credential to the key.encryptedKey- the key in xml encrypted base64binary string.- Returns:
- a newly generate key.
-
genRecoverableKey
public RecoverableKey genRecoverableKey(int relatedCredentialRequestId, byte[] encryptedKey)
Help method to generate a RecoverableKey structure consisting of a relatedCredentialRequestId and an encryptedKey.- Parameters:
relatedCredentialRequestId- reference to the credential request id.encryptedKey- the key in xml encrypted base64binary string.- Returns:
- a newly generate key.
-
-