@Component public class PowerAuthAuthenticationProvider extends PowerAuthAuthenticationProviderBase 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) |
void |
setApplicationConfiguration(PowerAuthApplicationConfiguration applicationConfiguration) |
void |
setPowerAuthClient(io.getlime.security.powerauth.soap.spring.client.PowerAuthServiceClient powerAuthClient) |
boolean |
supports(Class<?> authentication) |
PowerAuthApiAuthentication |
validateRequestSignature(String httpMethod,
byte[] httpBody,
String requestUriIdentifier,
String httpAuthorizationHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes)
Validate the signature from the PowerAuth 2.0 HTTP header against the provided HTTP method, request body and URI identifier.
|
PowerAuthApiAuthentication |
validateToken(String tokenHeader,
List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes) |
validateRequestSignature, validateRequestSignature, validateRequestSignature, validateToken@Autowired public void setPowerAuthClient(io.getlime.security.powerauth.soap.spring.client.PowerAuthServiceClient powerAuthClient)
@Autowired(required=false) public void setApplicationConfiguration(PowerAuthApplicationConfiguration applicationConfiguration)
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<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes) throws PowerAuthAuthenticationException
validateRequestSignature in class PowerAuthAuthenticationProviderBasehttpMethod - 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.PowerAuthAuthenticationException - In case authorization fails, exception is raised.public PowerAuthApiAuthentication validateToken(String tokenHeader, List<io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes> allowedSignatureTypes) throws PowerAuthAuthenticationException
validateToken in class PowerAuthAuthenticationProviderBasePowerAuthAuthenticationExceptionCopyright © 2017–2018 Lime - HighTech Solutions Inc.. All rights reserved.