Class PowerAuthApiAuthenticationImpl
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
io.getlime.security.powerauth.rest.api.spring.authentication.impl.PowerAuthApiAuthenticationImpl
- All Implemented Interfaces:
PowerAuthApiAuthentication,Serializable,Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class PowerAuthApiAuthenticationImpl extends org.springframework.security.authentication.AbstractAuthenticationToken implements PowerAuthApiAuthentication, Serializable
PowerAuth API authentication object used between intermediate server application (such as mobile
banking API) and core systems (such as banking core).
- Author:
- Petr Dvorak, petr@wultra.com
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PowerAuthApiAuthenticationImpl()Default constructorPowerAuthApiAuthenticationImpl(String activationId, String userId, String applicationId, List<String> applicationRoles, List<String> activationFlags, AuthenticationContext authenticationContext)Constructor for a new PowerAuthApiAuthenticationImpl. -
Method Summary
Modifier and Type Method Description PowerAuthActivationgetActivationContext()Get the activation context.List<String>getActivationFlags()Get activation flags.StringgetActivationId()Get activation ID.StringgetApplicationId()Get related application ID.List<String>getApplicationRoles()Get application roles.AuthenticationContextgetAuthenticationContext()Get PowerAuth authentication context.Collection<org.springframework.security.core.GrantedAuthority>getAuthorities()ObjectgetCredentials()io.getlime.security.powerauth.http.PowerAuthHttpHeadergetHttpHeader()Get the PowerAuth HTTP header.StringgetName()ObjectgetPrincipal()io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypesgetSignatureFactors()Return authentication factors related to the signature that was used to produce this authentication object.StringgetUserId()Get user ID.StringgetVersion()Get PowerAuth protocol version.voidsetActivationContext(PowerAuthActivation activationContext)Set the activation context.voidsetActivationFlags(List<String> activationFlags)Set activation flags.voidsetActivationId(String activationId)Set activation ID.voidsetApplicationId(String id)Set related application ID.voidsetApplicationRoles(List<String> applicationRoles)Set application roles.voidsetAuthenticationContext(AuthenticationContext authenticationContext)Set PowerAuth authentication context.voidsetHttpHeader(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)Set the PowerAuth HTTP header.voidsetSignatureFactors(io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes factors)Set authentication factors related to the signature that was used to produce this authentication object.voidsetUserId(String userId)Set user IDvoidsetVersion(String version)Set PowerAuth protocol version.Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getDetails, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
PowerAuthApiAuthenticationImpl
public PowerAuthApiAuthenticationImpl()Default constructor -
PowerAuthApiAuthenticationImpl
public PowerAuthApiAuthenticationImpl(String activationId, String userId, String applicationId, List<String> applicationRoles, List<String> activationFlags, AuthenticationContext authenticationContext)Constructor for a new PowerAuthApiAuthenticationImpl.- Parameters:
activationId- Activation ID.userId- User ID.applicationId- Application ID.applicationRoles- Application roles.activationFlags- Activation flags.authenticationContext- Authentication context.
-
-
Method Details
-
getName
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication- Overrides:
getAuthoritiesin classorg.springframework.security.authentication.AbstractAuthenticationToken
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
getUserId
Description copied from interface:PowerAuthApiAuthenticationGet user ID.- Specified by:
getUserIdin interfacePowerAuthApiAuthentication- Returns:
- User ID.
-
setUserId
Description copied from interface:PowerAuthApiAuthenticationSet user ID- Specified by:
setUserIdin interfacePowerAuthApiAuthentication- Parameters:
userId- User ID
-
getActivationId
Description copied from interface:PowerAuthApiAuthenticationGet activation ID. This method is deprecated, usePowerAuthApiAuthentication.getActivationContext()instead.- Specified by:
getActivationIdin interfacePowerAuthApiAuthentication- Returns:
- Activation ID.
-
setActivationId
Description copied from interface:PowerAuthApiAuthenticationSet activation ID. This method is deprecated, usePowerAuthApiAuthentication.getActivationContext()instead.- Specified by:
setActivationIdin interfacePowerAuthApiAuthentication- Parameters:
activationId- Activation ID.
-
getApplicationId
Description copied from interface:PowerAuthApiAuthenticationGet related application ID.- Specified by:
getApplicationIdin interfacePowerAuthApiAuthentication- Returns:
- Application ID.
-
setApplicationId
Description copied from interface:PowerAuthApiAuthenticationSet related application ID.- Specified by:
setApplicationIdin interfacePowerAuthApiAuthentication- Parameters:
id- Application ID.
-
getApplicationRoles
Description copied from interface:PowerAuthApiAuthenticationGet application roles.- Specified by:
getApplicationRolesin interfacePowerAuthApiAuthentication- Returns:
- Application roles.
-
setApplicationRoles
Description copied from interface:PowerAuthApiAuthenticationSet application roles.- Specified by:
setApplicationRolesin interfacePowerAuthApiAuthentication- Parameters:
applicationRoles- Application roles.
-
getActivationFlags
Description copied from interface:PowerAuthApiAuthenticationGet activation flags. This method is deprecated, usePowerAuthApiAuthentication.getActivationContext()instead.- Specified by:
getActivationFlagsin interfacePowerAuthApiAuthentication- Returns:
- Activation flags.
-
setActivationFlags
Description copied from interface:PowerAuthApiAuthenticationSet activation flags. This method is deprecated, usePowerAuthApiAuthentication.getActivationContext()instead.- Specified by:
setActivationFlagsin interfacePowerAuthApiAuthentication- Parameters:
activationFlags- Activation flags.
-
getSignatureFactors
public io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes getSignatureFactors()Description copied from interface:PowerAuthApiAuthenticationReturn authentication factors related to the signature that was used to produce this authentication object. This method is deprecated, usePowerAuthApiAuthentication.getAuthenticationContext()()} instead.- Specified by:
getSignatureFactorsin interfacePowerAuthApiAuthentication- Returns:
- Signature type (signature factors).
-
setSignatureFactors
public void setSignatureFactors(io.getlime.security.powerauth.crypto.lib.enums.PowerAuthSignatureTypes factors)Description copied from interface:PowerAuthApiAuthenticationSet authentication factors related to the signature that was used to produce this authentication object. This method is deprecated, usePowerAuthApiAuthentication.getAuthenticationContext()()} instead.- Specified by:
setSignatureFactorsin interfacePowerAuthApiAuthentication- Parameters:
factors- Signature type (signature factors).
-
getAuthenticationContext
Description copied from interface:PowerAuthApiAuthenticationGet PowerAuth authentication context.- Specified by:
getAuthenticationContextin interfacePowerAuthApiAuthentication- Returns:
- PowerAuth authentication context.
-
setAuthenticationContext
Description copied from interface:PowerAuthApiAuthenticationSet PowerAuth authentication context.- Specified by:
setAuthenticationContextin interfacePowerAuthApiAuthentication- Parameters:
authenticationContext- PowerAuth authentication context.
-
getVersion
Description copied from interface:PowerAuthApiAuthenticationGet PowerAuth protocol version.- Specified by:
getVersionin interfacePowerAuthApiAuthentication- Returns:
- PowerAuth protocol version.
-
setVersion
Description copied from interface:PowerAuthApiAuthenticationSet PowerAuth protocol version.- Specified by:
setVersionin interfacePowerAuthApiAuthentication- Parameters:
version- PowerAuth protocol version.
-
getHttpHeader
public io.getlime.security.powerauth.http.PowerAuthHttpHeader getHttpHeader()Description copied from interface:PowerAuthApiAuthenticationGet the PowerAuth HTTP header.- Specified by:
getHttpHeaderin interfacePowerAuthApiAuthentication- Returns:
- PowerAuth HTTP header.
-
setHttpHeader
public void setHttpHeader(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)Description copied from interface:PowerAuthApiAuthenticationSet the PowerAuth HTTP header.- Specified by:
setHttpHeaderin interfacePowerAuthApiAuthentication- Parameters:
httpHeader- PowerAuth HTTP header.
-
getActivationContext
Description copied from interface:PowerAuthApiAuthenticationGet the activation context.- Specified by:
getActivationContextin interfacePowerAuthApiAuthentication- Returns:
- Activation context.
-
setActivationContext
Description copied from interface:PowerAuthApiAuthenticationSet the activation context.- Specified by:
setActivationContextin interfacePowerAuthApiAuthentication- Parameters:
activationContext- Activation context.
-