Class IdinSender
java.lang.Object
org.frankframework.senders.AbstractSender
org.frankframework.senders.AbstractSenderWithParameters
org.frankframework.extensions.idin.IdinSender
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,HasPhysicalDestination
,IConfigurable
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,NameAware
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
Requires the net.bankid.merchant.library V1.2.9
- Author:
- Niels Meijer
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.frankframework.senders.AbstractSenderWithParameters
parameterNamesMustBeUnique, paramList
Fields inherited from class org.frankframework.senders.AbstractSender
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this component.protected net.bankid.merchant.library.Communicator
createCommunicator
(PipeLineSession session) protected net.bankid.merchant.library.Configuration
sendMessage
(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).void
setAcquirerAlternativeCertificateAlias
(String acquirerAlternativeCertificateAlias) This is the public certificate used to authenticate incoming messages from the Acquirer.void
setAcquirerCertificateAlias
(String acquirerCertificateAlias) This is the public certificate used to authenticate incoming messages from the Acquirer.void
setAcquirerDirectoryUrl
(String acquirerDirectoryUrl) void
setAcquirerStatusUrl
(String acquirerStatusUrl) void
setAcquirerTransactionUrl
(String acquirerTransactionUrl) void
setAction
(IdinSender.Action action) void
setConfigurationXML
(String iDinConfigurationXML) Load configuration from XML.void
setKeyStoreAuthAlias
(String keyStoreAuthAlias) The AuthAlias used to access the keystorevoid
setKeyStoreLocation
(String keyStoreLocation) The Java iDIN Software Library needs to access a keystore located in the Java classpath to store all the required certificatesvoid
setKeyStorePassword
(String keyStorePassword) The password used to access the keystorevoid
setLogsEnabled
(boolean logsEnabled) void
setMerchantCertificateAlias
(String merchantCertificateAlias) This is the certificate owned by the Merchant.void
setMerchantCertificateAuthAlias
(String merchantCertificateAuthAlias) In case the merchant certificate has been password protectedvoid
setMerchantCertificatePassword
(String merchantCertificatePassword) In case the merchant certificate has been password protectedvoid
setMerchantID
(String merchantMerchantID) This is the contract number for iDIN the Merchant received from its Acquirer after registration, and is used to unambiguously identify the Merchant.void
setMerchantReturnUrl
(String merchantReturnUrl) The web address provided by the Merchant in the transaction request that is used to redirect the Consumer back to the Merchant after completing the authentication in the Issuer domain.void
setMerchantReturnUrlSessionKey
(String merchantReturnUrlSessionKey) void
setMerchantSubID
(int merchantSubID) The SubID that uniquely defines the name and address of the Merchant to be used for iDIN, if operating under different brands or trading entities.void
setSamlCertificateAlias
(String samlCertificateAlias) This is the certificate owned by the Merchant.void
setSAMLCertificateAuthAlias
(String samlCertificateAuthAlias) In case the SAML certificate has been password protectedvoid
setSAMLCertificatePassword
(String samlCertificatePassword) In case the SAML certificate has been password protectedvoid
setServiceLogsEnabled
(boolean serviceLogsEnabled) void
setServiceLogsLocation
(String serviceLogsLocation) void
setServiceLogsPattern
(String serviceLogsPattern) void
setTls12Enabled
(boolean tls12Enabled) Methods inherited from class org.frankframework.senders.AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
Methods inherited from class org.frankframework.senders.AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setName, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasPhysicalDestination
getDomain
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow, start, stop
-
Constructor Details
-
IdinSender
public IdinSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure this component.configure()
is called once at startup of the framework in the configure method of the owner of thisIConfigurable
. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure()
, to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classAbstractSenderWithParameters
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
createConfiguration
protected net.bankid.merchant.library.Configuration createConfiguration() throws ConfigurationException- Throws:
ConfigurationException
-
createCommunicator
protected net.bankid.merchant.library.Communicator createCommunicator(PipeLineSession session) throws SenderException - Throws:
SenderException
-
sendMessage
@Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException Description copied from interface:ISender
Send a message to some destination (as configured in the Sender object). This method may only be called after theconfigure()
method is called.The following table shows the difference between synchronous and a-synchronous senders:
synchronous a-synchronous ISender.isSynchronous()
returnstrue
false
return value of sendMessage()
isthe reply-message the messageId of the message sent the correlationID specified with sendMessage()
may be ignored is sent with the message a {link TimeOutException} may be thrown if a timeout occurs waiting for a reply should not be expected Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or
synchronized
.- Specified by:
sendMessage
in interfaceISender
- Throws:
SenderException
-
getPhysicalDestinationName
- Specified by:
getPhysicalDestinationName
in interfaceHasPhysicalDestination
-
setAction
- Parameters:
action
- for the sender to execute, has to be one of "DIRECTORY", "RESPONSE" or "AUTHENTICATE".
-
setMerchantID
This is the contract number for iDIN the Merchant received from its Acquirer after registration, and is used to unambiguously identify the Merchant. This number is 10-digits long, where the first four digits are equal to the AcquirerID.- Parameters:
merchantMerchantID
- The contract number for the iDIN Merchant. Leading zeros must be included
-
setMerchantSubID
public void setMerchantSubID(int merchantSubID) The SubID that uniquely defines the name and address of the Merchant to be used for iDIN, if operating under different brands or trading entities. The Merchant obtains the SubID from its Acquirer after registration for iDIN. A Merchant can request permission from the Acquirer to use one or more SubIDs.- Parameters:
merchantSubID
- Unless agreed otherwise with the Acquirer, the Merchant has to use 0 (default)!
-
setMerchantReturnUrl
The web address provided by the Merchant in the transaction request that is used to redirect the Consumer back to the Merchant after completing the authentication in the Issuer domain. The URL does not necessarily begin with http:// or https://, it can also start with an app handler e.g. companyname-nlservice://.- Parameters:
merchantReturnUrl
- URL either http://..., https://... or app-hander e.g. company-service://...
-
setAcquirerDirectoryUrl
- Parameters:
acquirerDirectoryUrl
- The web address of the Acquirer's Routing service platform from where the list of Issuers is retrieved (using a directory request).
-
setAcquirerTransactionUrl
- Parameters:
acquirerTransactionUrl
- The web address of the Acquirer's Routing Service platform where the transactions (authentication requests) are initiated.
-
setAcquirerStatusUrl
- Parameters:
acquirerStatusUrl
- The web address of the Acquirer's Routing Service platform to where the library sends status request messages.
-
setKeyStoreLocation
The Java iDIN Software Library needs to access a keystore located in the Java classpath to store all the required certificates- Parameters:
keyStoreLocation
- A file path and name, accessible to the library, which is the Java keystore file where the certificates are stored
-
setKeyStorePassword
The password used to access the keystore- Parameters:
keyStorePassword
- The password for the keystore
-
setKeyStoreAuthAlias
The AuthAlias used to access the keystore- Parameters:
keyStoreAuthAlias
- The AuthAlias that contains the password for the keystore
-
getKeyStorePassword
-
setMerchantCertificateAlias
This is the certificate owned by the Merchant. It's the private certificate used to sign messages sent by the Merchant to the Acquirer's Routing Service platform. Its public key is also used by the Acquirer to authenticate incoming messages from the Merchant. The Merchant certificate must be in PKCS#12 format which has the extension .p12 or .pfx- Parameters:
merchantCertificateAlias
- The alias assigned to the signing certificate in the keystore file. This could be the alias you supplied explicitly when importing an existing certificate in the keystore, or it could be an alias automatically assigned by the keytool application.
-
setMerchantCertificatePassword
In case the merchant certificate has been password protected- Parameters:
merchantCertificatePassword
- The password for the Merchant Certificate
-
setMerchantCertificateAuthAlias
In case the merchant certificate has been password protected- Parameters:
merchantCertificateAuthAlias
- The AuthAlias that contains the password for the Merchant Certificate
-
getMerchantCertificatePassword
-
setAcquirerCertificateAlias
This is the public certificate used to authenticate incoming messages from the Acquirer. The library only needs its public key. The public certificate must be in PEM format (base64 ASCII) and typically has the file extension .cer,.crt or .pem.- Parameters:
acquirerCertificateAlias
- : The alias assigned to the Acquirer's certificate in the keystore. This could be the alias you supplied explicitly when importing an existing certificate in the keystore, or it could be an alias automatically assigned by the keytool application.
-
setAcquirerAlternativeCertificateAlias
This is the public certificate used to authenticate incoming messages from the Acquirer. The library only needs its public key. The public certificate must be in PEM format (base64 ASCII) and typically has the file extension .cer,.crt or .pem.- Parameters:
acquirerAlternativeCertificateAlias
- : The alias assigned to the Acquirer's certificate in the keystore. This could be the alias you supplied explicitly when importing an existing certificate in the keystore, or it could be an alias automatically assigned by the keytool application.
-
setSamlCertificateAlias
This is the certificate owned by the Merchant. Its public key is used by the Issuer to encrypt information. The Merchant can then use the private key to decrypt that information. The SAML certificate must be in PKCS#12 format which has the extension .p12 or .pfx;- Parameters:
samlCertificateAlias
- The alias assigned to the SAML certificate in the keystore. This could be the alias supplied explicitly when importing an existing certificate in the keystore, or it could be an alias automatically assigned by the keytool application.
-
setSAMLCertificatePassword
In case the SAML certificate has been password protected- Parameters:
samlCertificatePassword
- The password for the SAML Certificate
-
setSAMLCertificateAuthAlias
In case the SAML certificate has been password protected- Parameters:
samlCertificateAuthAlias
- The AuthAlias that contains the password for the SAML Certificate
-
getSAMLCertificatePassword
-
setLogsEnabled
public void setLogsEnabled(boolean logsEnabled) -
setServiceLogsEnabled
public void setServiceLogsEnabled(boolean serviceLogsEnabled) -
setServiceLogsLocation
-
setServiceLogsPattern
-
setTls12Enabled
public void setTls12Enabled(boolean tls12Enabled) - Parameters:
tls12Enabled
- the tls12Enabled to set
-
setMerchantReturnUrlSessionKey
- Parameters:
merchantReturnUrlSessionKey
- the merchantReturnUrlSessionKey to set
-
setConfigurationXML
Load configuration from XML. Attributes may overwrite this 'default'.
-