Class SignatureHeaderUtils
java.lang.Object
org.apache.cxf.rs.security.httpsignature.utils.SignatureHeaderUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddDateHeader(Map<String, List<String>> messageHeaders, ZoneOffset zoneOffset) Add a date header at the current time using the ZoneOffset.static StringcreateDigestHeader(String messageBody, String digestAlgorithmName) Get a base64 encoded digest using the Algorithm specified, typically SHA-256static MessageDigestcreateMessageDigestWithAlgorithm(String algorithmName) Get a MessageDigest object based on the algorithm in the digest stringstatic StringcreateRequestTarget(URI uri) static voidinspectMessageHeaders(Map<String, List<String>> messageHeaders) mapHeaders(Map<String, List<String>> multivaluedMap) Maps a multimap to a normal map with comma-separated values in case of duplicate headers according to the draft-cavage guidelines
-
Method Details
-
addDateHeader
Add a date header at the current time using the ZoneOffset. Date format is http -
mapHeaders
Maps a multimap to a normal map with comma-separated values in case of duplicate headers according to the draft-cavage guidelines- Parameters:
multivaluedMap- the multivalued map- Returns:
- A map with comma-separated values
-
createDigestHeader
Get a base64 encoded digest using the Algorithm specified, typically SHA-256- Parameters:
messageBody- The body of the message to be used to create the DigestdigestAlgorithmName- The name of the algorithm used to create the digest, SHA-256 and SHA-512 are valid- Returns:
- A base64 encoded digest ready to be added as a header to the message
-
createMessageDigestWithAlgorithm
Get a MessageDigest object based on the algorithm in the digest string- Returns:
- a valid MessageDigest object
-
inspectMessageHeaders
-
createRequestTarget
-