public class BinaryLightTokenHelper extends Object
Modifier and Type | Method and Description |
---|---|
static eu.eidas.auth.commons.tx.BinaryLightToken |
createBinaryLightToken(String issuerName,
String secret,
String algorithm)
Creates an instance of
BinaryLightToken . |
static String |
encodeBinaryLightTokenBase64(eu.eidas.auth.commons.tx.BinaryLightToken binaryLightToken)
Encodes the
binaryLightToken into Base64. |
static String |
getBinaryLightTokenId(String binaryLightTokenBase64,
String secret,
String algorithm)
Get the
BinaryLightToken id from a BinaryLightToken Base64 encoded string. |
static String |
getBinaryToken(javax.servlet.http.HttpServletRequest httpServletRequest,
String parameterKey)
Gets the
BinaryLightToken Base64 encoded. |
public static String getBinaryLightTokenId(@Nonnull String binaryLightTokenBase64, String secret, String algorithm) throws SpecificCommunicationException
BinaryLightToken
id from a BinaryLightToken
Base64 encoded string.binaryLightTokenBase64
- the BinaryLightToken
Base64 encodedsecret
- secret for creating the digestalgorithm
- digest algorithmBinaryLightToken
idSpecificCommunicationException
- if the algorithm
is an invalid onepublic static String getBinaryToken(@Nonnull javax.servlet.http.HttpServletRequest httpServletRequest, String parameterKey)
BinaryLightToken
Base64 encoded.httpServletRequest
- the http servlet request that contains the BinaryLightToken
Base64 encoded.parameterKey
- the parameter key of the BinaryLightToken
Base64 encodedBinaryLightToken
Base64 encodedpublic static String encodeBinaryLightTokenBase64(eu.eidas.auth.commons.tx.BinaryLightToken binaryLightToken)
binaryLightToken
into Base64.binaryLightToken
- the BinaryLightToken
to be createdBinaryLightToken
Base64 encodedpublic static eu.eidas.auth.commons.tx.BinaryLightToken createBinaryLightToken(String issuerName, String secret, String algorithm) throws SpecificCommunicationException
BinaryLightToken
.issuerName
- the issuer namesecret
- secret for creating the digestalgorithm
- digest algorithmBinaryLightToken
SpecificCommunicationException
- when digest algorithm could not be found.Copyright © 2020. All Rights Reserved.