public final class SignatureHeaderUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addDateHeader(Map<String,List<String>> messageHeaders,
ZoneOffset zoneOffset)
Add a date header at the current time using the ZoneOffset.
|
static String |
createDigestHeader(String messageBody,
String digestAlgorithmName)
Get a base64 encoded digest using the Algorithm specified, typically SHA-256
|
static MessageDigest |
createMessageDigestWithAlgorithm(String algorithmName)
Get a MessageDigest object based on the algorithm in the digest string
|
static String |
createRequestTarget(URI uri) |
static void |
inspectMessageHeaders(Map<String,List<String>> messageHeaders) |
static Map<String,String> |
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
|
public static void addDateHeader(Map<String,List<String>> messageHeaders, ZoneOffset zoneOffset)
public static Map<String,String> mapHeaders(Map<String,List<String>> multivaluedMap)
multivaluedMap
- the multivalued mappublic static String createDigestHeader(String messageBody, String digestAlgorithmName)
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 validpublic static MessageDigest createMessageDigestWithAlgorithm(String algorithmName)
public static void inspectMessageHeaders(Map<String,List<String>> messageHeaders)
Apache CXF