Package net.solarnetwork.web.security
Class AuthenticationDataV1
java.lang.Object
net.solarnetwork.web.security.AuthenticationData
net.solarnetwork.web.security.AuthenticationDataV1
Original HMAC-SHA1 authentication token scheme.
- Since:
- 1.11
- Version:
- 2.0
- Author:
- matt
-
Field Summary
Fields inherited from class net.solarnetwork.web.security.AuthenticationData
AUTH_TOKEN_ID_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationDataV1(SecurityHttpServletRequestWrapper request, String headerValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncomputeSignatureDigest(String secretKey) Compute the signature digest from the request data and a given secret key.Get the authentication token ID.Get the extracted signature data from this request.Get the signature digest as presented in the HTTP header value.Methods inherited from class net.solarnetwork.web.security.AuthenticationData
computeMACDigest, getDate, getDateSkew, getScheme, httpDate, isDateValid, nullSafeHeaderValue, validateContentDigest
-
Constructor Details
-
AuthenticationDataV1
public AuthenticationDataV1(SecurityHttpServletRequestWrapper request, String headerValue) throws IOException Constructor.- Parameters:
request- the requestheaderValue- theAuthorizationheader value- Throws:
IOException- if any IO error occurs
-
-
Method Details
-
getAuthTokenId
Description copied from class:AuthenticationDataGet the authentication token ID.- Specified by:
getAuthTokenIdin classAuthenticationData- Returns:
- The authentication token ID.
-
getSignatureDigest
Description copied from class:AuthenticationDataGet the signature digest as presented in the HTTP header value.- Specified by:
getSignatureDigestin classAuthenticationData- Returns:
- The presented signature digest.
-
getSignatureData
Description copied from class:AuthenticationDataGet the extracted signature data from this request.- Specified by:
getSignatureDatain classAuthenticationData- Returns:
- The raw signature data.
-
computeSignatureDigest
Description copied from class:AuthenticationDataCompute the signature digest from the request data and a given secret key.- Specified by:
computeSignatureDigestin classAuthenticationData- Parameters:
secretKey- The secret key.- Returns:
- The computed digest, as a Base64 encoded string.
-