@Component public class PowerAuthAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
| Constructor and Description |
|---|
PowerAuthAuthenticationProvider() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
supports(Class<?> authentication) |
PowerAuthApiAuthentication |
validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest,
String requestUriIdentifier,
String httpAuthorizationHeader)
The same as {
validateRequestSignature(HttpServletRequest, String, String, List) but uses default accepted signature type (2FA or 3FA). |
PowerAuthApiAuthentication |
validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<PowerAuthSignatureTypes> allowedSignatureTypes)
Validate a request signature, make sure only supported signature types are used.
|
PowerAuthApiAuthentication |
validateRequestSignature(String httpMethod,
byte[] httpBody,
String requestUriIdentifier,
String httpAuthorizationHeader)
The same as {
validateRequestSignature(String, byte[], String, String, List) but uses default accepted signature type (2FA or 3FA). |
PowerAuthApiAuthentication |
validateRequestSignature(String httpMethod,
byte[] httpBody,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<PowerAuthSignatureTypes> allowedSignatureTypes)
Validate the signature from the PowerAuth 2.0 HTTP header against the provided HTTP method, request body and URI identifier.
|
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionpublic boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic PowerAuthApiAuthentication validateRequestSignature(String httpMethod, byte[] httpBody, String requestUriIdentifier, String httpAuthorizationHeader, List<PowerAuthSignatureTypes> allowedSignatureTypes) throws Exception
httpMethod - HTTP method (GET, POST, ...)httpBody - Body of the HTTP request.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth 2.0 HTTP authorization header.allowedSignatureTypes - Allowed types of the signature.Exception - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(String httpMethod, byte[] httpBody, String requestUriIdentifier, String httpAuthorizationHeader) throws Exception
validateRequestSignature(String, byte[], String, String, List) but uses default accepted signature type (2FA or 3FA).httpMethod - HTTP method (GET, POST, ...)httpBody - Request bodyrequestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth 2.0 HTTP authorization header.Exception - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest, String requestUriIdentifier, String httpAuthorizationHeader, List<PowerAuthSignatureTypes> allowedSignatureTypes) throws Exception
servletRequest - HTTPServletRequest with signed data.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth 2.0 HTTP authorization header.allowedSignatureTypes - Allowed types of signatures.Exception - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateRequestSignature(javax.servlet.http.HttpServletRequest servletRequest, String requestUriIdentifier, String httpAuthorizationHeader) throws Exception
validateRequestSignature(HttpServletRequest, String, String, List) but uses default accepted signature type (2FA or 3FA).servletRequest - HTTPServletRequest with signed data.requestUriIdentifier - Request URI identifier.httpAuthorizationHeader - PowerAuth 2.0 HTTP authorization header.Exception - In case authorization fails, exception is raised.Copyright © 2016 Lime - HighTech Solutions Inc.. All rights reserved.