public class MerchantContext extends Object
Constructor and Description |
---|
MerchantContext()
Empty Constructor
|
MerchantContext(String merchantName,
String p12Keystore,
String webAddress,
String proxyHost,
String proxyPort,
String proxyUsername,
String proxyPassword,
String vaProxyHost,
String vaProxyPort,
String vaProxyUsername,
String vaProxyPassword,
String serviceHostProxyHost,
String serviceHostProxyPort,
String serviceHostProxyUsername,
String serviceHostProxyPassword,
String sdmProxyHost,
String sdmProxyPort,
String sdmProxyUsername,
String sdmProxyPassword,
String mobileProxyHost,
String mobileProxyPort,
String mobileProxyUsername,
String mobileProxyPassword,
String tokenUserPIN,
String timeout,
String vaPort,
boolean vaSSLDisabled,
String truststore,
String logPropFile,
String loggerName,
boolean runRegisterSSLProvider)
Creates a MerchantContext with the input parametes
|
Modifier and Type | Method and Description |
---|---|
void |
addGrantedCertificatePolicy(GrantedCertificatePolicy gp) |
void |
addGrantedCertificatePolicy(String certificatePolicyOID) |
X509Certificate[] |
getAlternativeBankIdRootCertificate() |
X509Certificate |
getAuthCert()
Returns the merchants authentication certificate
|
X509Certificate[] |
getAuthCertificateChain()
Returns the merchant authentication certificate chain
|
PrivateKey |
getAuthCertPrivKey()
Returns the PrivateKey that corresponds with the merchant
authentication certificate
|
PublicKey |
getAuthCertPubKey()
Returns the Public Key that resides in the merchants
authentication certificate
|
byte[] |
getAuthPrivKeyLabel()
Returns the authentication PrivateKey Label
|
X509Certificate |
getBankIdRootCertificate()
Return the BankID Root Certificate configured for this merchant context.
|
int |
getCertificateKeySize() |
List<String> |
getCertificatePolicyAccessList()
Returns a HashMap containing a Map of Certificate Policies that
are allowed to be used in this Context
|
String |
getCommTimeout()
Returns the external communication timeout in millis
|
HashMap<String,ArrayList<String>> |
getDictionaryMap() |
HashMap<String,Long> |
getDictionaryTimeStampMap() |
Env |
getEnvironment()
Gets the Enironment instance
|
String |
getGrantedPoliciesAsString() |
String |
getHttpProxyHost()
Returns the Proxy Host or null
|
String |
getHttpProxyPassword()
Returns the proxy passsword or null
|
String |
getHttpProxyPort()
Returns the proxy port or null
|
String |
getHttpProxyUsername()
Returns the proxy user for authentication
|
BIDLogger |
getLogger() |
String |
getLoggerName() |
String |
getLogPropFile()
Returns the location of the logPropFile
|
String |
getMerchantIdentifier()
Returns the merchantname/identifier
|
String |
getMitmWebAddress()
Returns the MITM WebAddress
|
String |
getMobileCommTimeout() |
com.google.api.client.http.HttpRequestFactory |
getMobileHttpRequestFactory() |
String |
getMobileProxyHost()
Returns the Proxy Host for MobileGateway proxy or null
|
String |
getMobileProxyPassword()
Returns the proxy passsword for MobileGateway proxy or null
|
String |
getMobileProxyPort()
Returns the proxy port for MobileGateway proxy or null
|
String |
getMobileProxyUsername()
Returns the proxy user for authentication for MobileGateway proxy
|
String |
getP12Keystore()
Returns the path to the keystore
|
String |
getSdmCommTimeout() |
com.google.api.client.http.HttpRequestFactory |
getSdmHttpRequestFactory() |
String |
getSdmProxyHost() |
String |
getSdmProxyPassword() |
String |
getSdmProxyPort() |
String |
getSdmProxyUsername() |
String |
getServiceHostCommTimeout() |
com.google.api.client.http.HttpRequestFactory |
getServiceHostHttpRequestFactory() |
String |
getServiceHostProxyHost() |
String |
getServiceHostProxyPassword() |
String |
getServiceHostProxyPort() |
String |
getServiceHostProxyUsername() |
X509Certificate |
getSignCert()
Return the signer certificate
|
X509Certificate[] |
getSignCertificateChain()
Returns the merchants signer certificate chain
|
PrivateKey |
getSignCertPrivKey()
Returns the Private Key
|
PublicKey |
getSignCertPubKey()
Returns the PublicKey that resides in the merchants
signer certificate
|
String |
getSignerCertCN()
Returns the CommonName from the signer certificate
|
X509Certificate |
getSignerCertIssuer()
Returns the Level 1 CA certificate that signed the signer certificates
|
byte[] |
getSignPrivKeyLabel()
Returns the signing PrivateKey Label
|
int |
getSlot()
Returns the slot containing the token (HSM) that holds this
Merchants PrivateKeys
|
String |
getSupportedBankIDCarriers() |
String |
getSupportedBankIDCertTypes() |
String |
getTokenStorage()
Returns the token storage flag
|
String |
getTokenUserPIN()
Returns the HSM login pwd
|
TrustManager[] |
getTrustManagers() |
String |
getTrustStore() |
String |
getVaCommTimeout() |
com.google.api.client.http.HttpRequestFactory |
getVAHttpRequestFactory() |
String |
getVaPort() |
String |
getVAProxyHost()
Returns the Proxy Host for VA proxy or null
|
String |
getVAProxyPassword()
Returns the proxy passsword for VA proxy or null
|
String |
getVAProxyPort()
Returns the proxy port for VA proxy or null
|
String |
getVAProxyUsername()
Returns the proxy user for authentication for VA proxy
|
void |
initCertificateAccessList()
Inserts the default BankID Certificates to support
|
boolean |
isInitialized()
Return true if initContext is called, else false
|
boolean |
isRAContext()
Returns true if the merchant certificate is a RASigning cert
|
boolean |
isRunRegisterSSLProvider() |
boolean |
isVASSLDisabled() |
void |
removeGrantedCertificatePolicy(String oid) |
void |
setAlternativeBankIdRootCertificate(X509Certificate[] altRoots) |
void |
setAuthCert(X509Certificate certificate)
Sets the merchant's authentication certificate
|
void |
setAuthCertificateChain(X509Certificate[] chain)
Sets the merchant authentication certificate chain
|
void |
setAuthCertPrivKey(PrivateKey key)
Sets the PrivateKey that corresponds with the merchant
authentication certificate
|
void |
setAuthCertPubKey(PublicKey key)
Set the public key that is retrived from the merchants authentication
certificate
|
void |
setAuthPrivKeyLabel(byte[] bs)
Sets the authentication PrivateKey Label
|
void |
setBankIdRootCertificate(X509Certificate certificate)
Sets the root certificate for this context.
|
void |
setCertificateKeySize(int certificateKeySize) |
void |
setCommTimeout(String string)
Sets the external communication timeout in millis
|
void |
setEnvironment(Env env)
Sets the Env instance
|
void |
setHttpProxyHost(String string)
Sets the proxy host
|
void |
setHttpProxyPassword(String string)
Sets the proxy password
|
void |
setHttpProxyPort(String string)
Sets the proxy port
|
void |
setHttpProxyUsername(String string)
Sets the proxy username
|
void |
setInitialized(boolean b)
Sets boolean if the context is initialized
|
void |
setLoggerName(String loggerName) |
void |
setLogPropFile(String logPropFile)
Sets the location of the logPropFile
|
void |
setMerchantIdentifier(String string)
Sets the merchant identifier
|
void |
setMerchantLogger(BIDLogger logger) |
void |
setMitmWebAddress(String string)
Sets the MITM WebAddresses and ipAddresses
|
void |
setMobileCommTimeout(String mobileCommTimeout) |
void |
setMobileHttpRequestFactory(com.google.api.client.http.HttpRequestFactory mobileHttpRequestFactory) |
void |
setMobileProxyHost(String string)
Sets the proxy host for MobileGateway proxy
|
void |
setMobileProxyPassword(String string)
Sets the proxy password for MobileGateway proxy
|
void |
setMobileProxyPort(String string)
Sets the proxy port for MobileGateway proxy
|
void |
setMobileProxyUsername(String string)
Sets the proxy username for MobileGateway proxy
|
void |
setP12Keystore(String string)
Sets the path to the merchant keystore (PKCS#12)
|
void |
setRAContext(boolean b)
Set true if the merchant certificate is a RASigning cert
|
void |
setRunRegisterSSLProvider(boolean runRegisterSSLProvider) |
void |
setSdmCommTimeout(String sdmCommTimeout) |
void |
setSdmHttpRequestFactory(com.google.api.client.http.HttpRequestFactory sdmHttpRequestFactory) |
void |
setSdmProxyHost(String sdmProxyHost) |
void |
setSdmProxyPassword(String sdmProxyPassword) |
void |
setSdmProxyPort(String sdmProxyPort) |
void |
setSdmProxyUsername(String sdmProxyUsername) |
void |
setServiceHostCommTimeout(String serviceHostCommTimeout) |
void |
setServiceHostHttpRequestFactory(com.google.api.client.http.HttpRequestFactory serviceHostHttpRequestFactory) |
void |
setServiceHostProxyHost(String serviceHostProxyHost) |
void |
setServiceHostProxyPassword(String serviceHostProxyPassword) |
void |
setServiceHostProxyPort(String serviceHostProxyPort) |
void |
setServiceHostProxyUsername(String serviceHostProxyUsername) |
void |
setSignCert(X509Certificate certificate)
Sets the merchants signer certificate
|
void |
setSignCertificateChain(X509Certificate[] chain)
Sets the merchant Signer certificate chain
|
void |
setSignCertPrivKey(PrivateKey key)
Sets the signer certificates private key
|
void |
setSignCertPubKey(PublicKey key)
Sets the PublicKey that resides in the merchants signer certificate
|
void |
setSignerCertCN(String string)
Sets the Commonname from the signer certificate
|
void |
setSignerCertIssuer(X509Certificate certificate)
Sets the SignerCert issuer cert (CA Level 1)
|
void |
setSignPrivKeyLabel(byte[] bs)
Sets the signing PrivateKey Label
|
void |
setSlot(int i)
Sets the slot containg the token (HSM) that holds this
Merchants PrivateKeys
|
void |
setTokenStorage(String string)
Sets the token storage flag
|
void |
setTokenUserPIN(String string)
Sets the the HSM login pwd
|
void |
setTrustManagers(TrustManager[] trustManagers) |
void |
setVaCommTimeout(String vaCommTimeout) |
void |
setVAHttpRequestFactory(com.google.api.client.http.HttpRequestFactory vaHttpRequestFactory) |
void |
setVaPort(String string) |
void |
setVAProxyHost(String string)
Sets the proxy host for VA proxy
|
void |
setVAProxyPassword(String string)
Sets the proxy password for VA proxy
|
void |
setVAProxyPort(String string)
Sets the proxy port for VA proxy
|
void |
setVAProxyUsername(String string)
Sets the proxy username for VA proxy
|
void |
setVaSSLDisabled(boolean value) |
void |
updateDictionaryMap(String key,
ArrayList<String> dictionary) |
void |
updateTimeStampMap(String locale,
long currentTimeMillis) |
public MerchantContext()
public MerchantContext(String merchantName, String p12Keystore, String webAddress, String proxyHost, String proxyPort, String proxyUsername, String proxyPassword, String vaProxyHost, String vaProxyPort, String vaProxyUsername, String vaProxyPassword, String serviceHostProxyHost, String serviceHostProxyPort, String serviceHostProxyUsername, String serviceHostProxyPassword, String sdmProxyHost, String sdmProxyPort, String sdmProxyUsername, String sdmProxyPassword, String mobileProxyHost, String mobileProxyPort, String mobileProxyUsername, String mobileProxyPassword, String tokenUserPIN, String timeout, String vaPort, boolean vaSSLDisabled, String truststore, String logPropFile, String loggerName, boolean runRegisterSSLProvider)
merchantName
- String The merchant namep12Keystore
- String The merchant keystorewebAddress
- String the comma-delimited dns and ipsproxyHost
- String The proxy hostproxyPort
- String The proxy portproxyUsername
- String The proxy usernameproxyPassword
- Strnig The proxy pwdpublic void initCertificateAccessList()
public String getGrantedPoliciesAsString()
public void addGrantedCertificatePolicy(GrantedCertificatePolicy gp)
public void addGrantedCertificatePolicy(String certificatePolicyOID)
public void removeGrantedCertificatePolicy(String oid)
public String getSupportedBankIDCarriers()
public String getSupportedBankIDCertTypes()
public String getHttpProxyPassword()
public String getHttpProxyHost()
public String getHttpProxyPort()
public String getHttpProxyUsername()
public boolean isInitialized()
public String getMerchantIdentifier()
public String getMitmWebAddress()
public String getP12Keystore()
public void setHttpProxyPassword(String string)
string
- String the proxy password, corresponds to the userpublic void setHttpProxyHost(String string)
string
- String The proxy hostpublic void setHttpProxyPort(String string)
string
- String the proxy port or nullpublic void setHttpProxyUsername(String string)
string
- String the username used in proxy authenticationpublic void setInitialized(boolean b)
b
- boolean true if initialized, else falsepublic void setMerchantIdentifier(String string)
string
- The merchant namepublic void setMitmWebAddress(String string)
string
- The MITM informationpublic void setP12Keystore(String string)
string
- The fileURL to the merchant keystorepublic PublicKey getAuthCertPubKey()
public X509Certificate getSignCert()
public PrivateKey getSignCertPrivKey()
public PublicKey getSignCertPubKey()
public void setAuthCertPubKey(PublicKey key)
key
- PublicKey The public key from the authentication certificatepublic void setSignCert(X509Certificate certificate)
certificate
- X509Certificate The signer certificatepublic void setSignCertPrivKey(PrivateKey key)
key
- PrivateKet The signer cert private keypublic void setSignCertPubKey(PublicKey key)
key
- PublicKey the public key from the signer certificatepublic X509Certificate getAuthCert()
public PrivateKey getAuthCertPrivKey()
public void setAuthCert(X509Certificate certificate)
certificate
- X509Certificate the certificatepublic void setAuthCertPrivKey(PrivateKey key)
key
- PrivateKey stored in the merchant keystorepublic X509Certificate[] getAuthCertificateChain()
public X509Certificate[] getSignCertificateChain()
public void setAuthCertificateChain(X509Certificate[] chain)
chain
- X509Certificate[] for the merchant authentication certificatepublic void setSignCertificateChain(X509Certificate[] chain)
chain
- X509Certificate[] for the merchant signer certificatepublic List<String> getCertificatePolicyAccessList()
public String getTokenStorage()
public void setTokenStorage(String string)
string
- The token storage flagpublic X509Certificate getBankIdRootCertificate()
public void setBankIdRootCertificate(X509Certificate certificate)
certificate
- X509Certificate holding the BankID Root Certificatepublic Env getEnvironment()
public void setEnvironment(Env env)
env
- Envpublic String getSignerCertCN()
public void setSignerCertCN(String string)
string
- String The CommonNamepublic byte[] getAuthPrivKeyLabel()
public byte[] getSignPrivKeyLabel()
public int getSlot()
public void setAuthPrivKeyLabel(byte[] bs)
bs
- The authentication PrivateKey Labelpublic void setSignPrivKeyLabel(byte[] bs)
bs
- The signing PrivateKey Labelpublic void setSlot(int i)
i
- int The slot containg the token holding the merchant PrivateKeyspublic String getTokenUserPIN()
public void setTokenUserPIN(String string)
string
- String the HSM login pwdpublic boolean isRAContext()
public void setRAContext(boolean b)
b
- true if the merchant certificate is a RASigning cert, else falsepublic X509Certificate getSignerCertIssuer()
public void setSignerCertIssuer(X509Certificate certificate)
certificate
- X509Certificate The level 1 CA Certificatepublic String getCommTimeout()
public void setCommTimeout(String string)
string
- The comm timeout in millispublic String getVaPort()
public void setVaPort(String string)
public boolean isVASSLDisabled()
public void setVaSSLDisabled(boolean value)
public String getVaCommTimeout()
public void setVaCommTimeout(String vaCommTimeout)
vaCommTimeout
- connect and read timeouts for VA communication.
Null means using default getCommTimeout()
public String getVAProxyPassword()
public String getVAProxyHost()
public String getVAProxyPort()
public String getVAProxyUsername()
public void setVAProxyPassword(String string)
string
- String the proxy password, corresponds to the userpublic void setVAProxyHost(String string)
string
- String The proxy hostpublic void setVAProxyPort(String string)
string
- String the proxy port or nullpublic void setVAProxyUsername(String string)
string
- String the username used in proxy authenticationpublic com.google.api.client.http.HttpRequestFactory getVAHttpRequestFactory()
setVAHttpRequestFactory(HttpRequestFactory)
,
getVAProxyHost()
public void setVAHttpRequestFactory(com.google.api.client.http.HttpRequestFactory vaHttpRequestFactory)
public String getMobileProxyPassword()
public String getMobileProxyHost()
public String getMobileProxyPort()
public String getMobileProxyUsername()
public void setMobileProxyPassword(String string)
string
- String the proxy password, corresponds to the userpublic void setMobileProxyHost(String string)
string
- String The proxy hostpublic void setMobileProxyPort(String string)
string
- String the proxy port or nullpublic void setMobileProxyUsername(String string)
string
- String the username used in proxy authenticationpublic String getMobileCommTimeout()
public void setMobileCommTimeout(String mobileCommTimeout)
mobileCommTimeout
- connect and read timeouts for Mobile communication.
Null means using default getCommTimeout()
public com.google.api.client.http.HttpRequestFactory getMobileHttpRequestFactory()
setMobileHttpRequestFactory(HttpRequestFactory)
,
getMobileProxyHost()
public void setMobileHttpRequestFactory(com.google.api.client.http.HttpRequestFactory mobileHttpRequestFactory)
public void setCertificateKeySize(int certificateKeySize)
public int getCertificateKeySize()
public String getTrustStore()
public void setAlternativeBankIdRootCertificate(X509Certificate[] altRoots)
public X509Certificate[] getAlternativeBankIdRootCertificate()
public void setTrustManagers(TrustManager[] trustManagers)
public TrustManager[] getTrustManagers()
public String getLogPropFile()
public void setLogPropFile(String logPropFile)
logPropFile
- the location of the logPropFile.public void setMerchantLogger(BIDLogger logger)
public BIDLogger getLogger()
public String getLoggerName()
public void setLoggerName(String loggerName)
public void updateTimeStampMap(String locale, long currentTimeMillis)
public void setRunRegisterSSLProvider(boolean runRegisterSSLProvider)
public boolean isRunRegisterSSLProvider()
public String getServiceHostProxyHost()
public void setServiceHostProxyHost(String serviceHostProxyHost)
public String getServiceHostProxyPort()
public void setServiceHostProxyPort(String serviceHostProxyPort)
public String getServiceHostProxyUsername()
public void setServiceHostProxyUsername(String serviceHostProxyUsername)
public String getServiceHostProxyPassword()
public void setServiceHostProxyPassword(String serviceHostProxyPassword)
public String getServiceHostCommTimeout()
public void setServiceHostCommTimeout(String serviceHostCommTimeout)
serviceHostCommTimeout
- connect and read timeouts for ServiceHost communication.
Null means using default getCommTimeout()
public com.google.api.client.http.HttpRequestFactory getServiceHostHttpRequestFactory()
setServiceHostHttpRequestFactory(HttpRequestFactory)
,
getServiceHostProxyHost()
public void setServiceHostHttpRequestFactory(com.google.api.client.http.HttpRequestFactory serviceHostHttpRequestFactory)
public String getSdmProxyHost()
public void setSdmProxyHost(String sdmProxyHost)
public String getSdmProxyPort()
public void setSdmProxyPort(String sdmProxyPort)
public String getSdmProxyUsername()
public void setSdmProxyUsername(String sdmProxyUsername)
public String getSdmProxyPassword()
public void setSdmProxyPassword(String sdmProxyPassword)
public String getSdmCommTimeout()
public void setSdmCommTimeout(String sdmCommTimeout)
sdmCommTimeout
- connect and read timeouts for SDM communication.
Null means using default getCommTimeout()
public com.google.api.client.http.HttpRequestFactory getSdmHttpRequestFactory()
setSdmHttpRequestFactory(HttpRequestFactory)
,
getSdmProxyHost()
public void setSdmHttpRequestFactory(com.google.api.client.http.HttpRequestFactory sdmHttpRequestFactory)
Copyright © 2017 Nets Branch Norway. All Rights Reserved.