public abstract class PowerAuthAuthenticationProviderBase extends Object
| Constructor and Description |
|---|
PowerAuthAuthenticationProviderBase() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
extractRequestBodyBytes(javax.servlet.http.HttpServletRequest servletRequest)
Extract request body bytes from HTTP servlet request.
|
PowerAuthApiAuthentication |
validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest,
String requestUriIdentifier,
String httpAuthorizationHeader)
The same as {
validateRequestSignature(HttpServletRequest, String, String, List, Integer) but uses default accepted signature type (2FA or 3FA) and does not specify forced signature version. |
PowerAuthApiAuthentication |
validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes)
Validate a request signature, make sure only supported signature types are used, do not use forced signature version during upgrade.
|
PowerAuthApiAuthentication |
validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes,
Integer forcedSignatureVersion)
Validate a request signature, make sure only supported signature types are used and allow specification of forced signature version.
|
PowerAuthApiAuthentication |
validateRequestSignature(String httpMethod,
byte[] httpBody,
String requestUriIdentifier,
String httpAuthorizationHeader)
The same as {
validateRequestSignature(String, byte[], String, String, List, Integer) but uses default accepted signature type (2FA or 3FA) and does not specify forced signature version. |
abstract PowerAuthApiAuthentication |
validateRequestSignature(String httpMethod,
byte[] httpBody,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes,
Integer forcedSignatureVersion)
Validate the signature from the PowerAuth HTTP header against the provided HTTP method, request body and URI identifier.
|
PowerAuthApiAuthentication |
validateToken(String tokenHeader)
Validate the token digest from PowerAuth authentication header.
|
abstract PowerAuthApiAuthentication |
validateToken(String httpAuthorizationHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes)
Validate the token digest from PowerAuth authentication header.
|
public abstract PowerAuthApiAuthentication validateRequestSignature(String httpMethod, byte[] httpBody, String requestUriIdentifier, String httpAuthorizationHeader, List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes, @Nullable Integer forcedSignatureVersion) throws PowerAuthAuthenticationException
httpMethod - HTTP method (GET, POST, ...)httpBody - Body of the HTTP request.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth HTTP authorization header.allowedSignatureTypes - Allowed types of the signature.forcedSignatureVersion - Forced signature version during upgrade.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public abstract PowerAuthApiAuthentication validateToken(String httpAuthorizationHeader, List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes) throws PowerAuthAuthenticationException
httpAuthorizationHeader - HTTP header with token digest.allowedSignatureTypes - Allowed types of the signature.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(String httpMethod, byte[] httpBody, String requestUriIdentifier, String httpAuthorizationHeader) throws PowerAuthAuthenticationException
validateRequestSignature(String, byte[], String, String, List, Integer) but uses default accepted signature type (2FA or 3FA) and does not specify forced signature version.httpMethod - HTTP method (GET, POST, ...)httpBody - Request bodyrequestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth HTTP authorization header.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest, String requestUriIdentifier, String httpAuthorizationHeader, List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes) throws PowerAuthAuthenticationException
servletRequest - HTTPServletRequest with signed data.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth HTTP authorization header.allowedSignatureTypes - Allowed types of signatures.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest, String requestUriIdentifier, String httpAuthorizationHeader, List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes, @Nullable Integer forcedSignatureVersion) throws PowerAuthAuthenticationException
servletRequest - HTTPServletRequest with signed data.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth HTTP authorization header.allowedSignatureTypes - Allowed types of signatures.forcedSignatureVersion - Forced signature version during upgrade.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest, String requestUriIdentifier, String httpAuthorizationHeader) throws PowerAuthAuthenticationException
validateRequestSignature(HttpServletRequest, String, String, List, Integer) but uses default accepted signature type (2FA or 3FA) and does not specify forced signature version.servletRequest - HTTPServletRequest with signed data.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth HTTP authorization header.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateToken(String tokenHeader) throws PowerAuthAuthenticationException
tokenHeader - HTTP header with token digest.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public byte[] extractRequestBodyBytes(javax.servlet.http.HttpServletRequest servletRequest)
throws PowerAuthAuthenticationException
servletRequest - HTTP servlet request.PowerAuthAuthenticationException - In case request body is invalid.Copyright © 2017–2020 Wultra s.r.o.. All rights reserved.