|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectat.knowcenter.wag.egov.egiz.sig.connectors.bku.BKUHelper
Contains static helper methods used by the BKU Connectors.
| Constructor Summary | |
BKUHelper()
|
|
| Method Summary | |
static void |
checkResponseForError(String response_string)
Checks the response xml for an error description and if found throws an appropriate exception. |
static String |
formDateTimeElement(Date verificationTime)
|
static String |
formDateTimeElement(Date verificationTime,
String namespace)
|
static String |
getBKUIdentifier(HttpServletRequest request)
|
static String |
getBKUIdentifier(Properties parsedResponseProperties)
|
static Properties |
getBKUProperties(HttpServletRequest request)
|
static SignSignatureObject |
parseCreateXMLResponse(String xmlResponse,
IdFormatter id_formatter,
ConnectorEnvironment environment)
This method parses the BKU-Response string. |
static SignatureResponse |
parseVerifyXMLResponse(String xmlResponse)
This method parses the verify response string and return a SignatureResponse object. |
static String |
prepareBase64Content(SignatureData data)
Encodes the given SignatureData to a valid Base64Content. |
static byte[] |
prepareEnvelopingData(SignatureData data)
Prepares the enveloping data. |
static String |
removeAllWhitespace(String str)
Removes all whitespaces ("\\s") from the String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BKUHelper()
| Method Detail |
public static String prepareBase64Content(SignatureData data)
The data is Base64 encoded. If the mime-type suggests that the data is binary, it is Base64 encoded for a second time.
data - The data to be converted to a valid Base64 content.
public static byte[] prepareEnvelopingData(SignatureData data)
This is useful for building the hash.
data - The data to be prepared.
public static void checkResponseForError(String response_string)
throws ConnectorException
response_string - The response xml.
ConnectorException - f.e.
public static SignSignatureObject parseCreateXMLResponse(String xmlResponse,
IdFormatter id_formatter,
ConnectorEnvironment environment)
throws ConnectorException
It separates the SignatureValue, X509IssuerName, SigningTime, X509SerialNumber, X509Certificate, CertDigest, DigestValue and the signation id-s. If the X509Certificate is extracted it would be stored in the certificates directory.
xmlResponse - The response string.
ConnectorException - ErrorCode (303, 304)SignatureObject,
CodingHelper,
X509Certpublic static String removeAllWhitespace(String str)
str - The String.
public static SignatureResponse parseVerifyXMLResponse(String xmlResponse)
xmlResponse - the response values from the BKU-verify request
SignatureResponsepublic static String formDateTimeElement(Date verificationTime)
public static String formDateTimeElement(Date verificationTime,
String namespace)
public static String getBKUIdentifier(Properties parsedResponseProperties)
public static String getBKUIdentifier(HttpServletRequest request)
public static Properties getBKUProperties(HttpServletRequest request)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||