Class NotificationSDKServerCredentials
java.lang.Object
com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerCredentials
The NotificationSDKServerCredentials object encompasses the customer's credentials necessary to
log in to each platform specific push notification services. It must be provided to the
NotificationSDKServer
constructor.
For iOS, both the token-based and certificate-based authentication schemes are supported. When using certificate-based authentication you need to provide:
- The path to a p12 file containing a certificate for the Apple Push Notification service (Sandbox or Production)
- The password of the p12 file
- The path to a p8 file containing a key for the Apple Push Notification service
- The ID of the provided key
- The ID of team responsible for the creation of the key
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the path to the Firebase service account JSON configuration file to be used during the communication with the server.byte[]
Gets the bytes of the Firebase service account JSON configuration file to be used during the communication with the server.Gets the input stream of the Firebase service account JSON configuration file to be used during the communication with the server.Deprecated.Gets the ID of the keyGets the password of the p12 fileGets the path to the p12 file containing the certificate to be used for the authentication with the serverGets the stream to the p12 file containing the certificate to be used for the authentication with the serverGets the path to the p8 file containing the key to be used for the authentication with the serverGets the stream to the p8 file containing the key to be used for the authentication with the serverGets the ID of the teamvoid
setAndroidFirebaseServiceAccountJson
(String firebaseServiceAccountJson) Sets the Firebase service account JSON configuration file for the Android specific notification service.void
setAndroidFirebaseServiceAccountJsonBytes
(byte[] firebaseServiceAccountJsonBytes) Sets the Firebase service account JSON configuration bytes for the Android specific notification service.void
setAndroidFirebaseServiceAccountJsonStream
(InputStream firebaseServiceAccountJsonStream) Sets the Firebase service account JSON configuration stream for the Android specific notification service.void
setAndroidPlatformCredentials
(String projectKey) Deprecated.void
setiOSPlatformCredentials
(boolean useDevelopmentServer, InputStream p12CertificateStream, String p12CertificatePassword) Sets the credentials for the certificate-based authentication on the iOS platform.void
setiOSPlatformCredentials
(boolean useDevelopmentServer, InputStream p8KeyStream, String keyId, String teamId) Sets the credentials for the token-based authentication on the iOS platform.void
setiOSPlatformCredentials
(boolean useDevelopmentServer, String p12CertificatePath, String p12CertificatePassword) Sets the credentials for the certificate-based authentication on the iOS platform.void
setiOSPlatformCredentials
(boolean useDevelopmentServer, String p8KeyPath, String keyId, String teamId) Sets the credentials for the token-based authentication on the iOS platform.boolean
Gets the status of the server to be used.
-
Constructor Details
-
NotificationSDKServerCredentials
public NotificationSDKServerCredentials()Creates aNotificationSDKServerCredentials
object. The platform specific attributes must be set using the dedicated methods.
-
-
Method Details
-
setAndroidPlatformCredentials
Deprecated.Sets the credentials for the Android specific notification service. It is retrieved from the Google API Console.- Parameters:
projectKey
- the key to be used for the communication with the server
-
getAndroidProjectKey
Deprecated.UsegetAndroidFirebaseServiceAccountJson()
instead.Gets the project key to be used during the communication with the server.- Returns:
- the key to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJson
Sets the Firebase service account JSON configuration file for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJson
- the path to the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJson
Gets the path to the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the path to the Firebase service account JSON configuration file to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJsonStream
public void setAndroidFirebaseServiceAccountJsonStream(InputStream firebaseServiceAccountJsonStream) Sets the Firebase service account JSON configuration stream for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJsonStream
- the stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJsonStream
Gets the input stream of the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the input stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
setAndroidFirebaseServiceAccountJsonBytes
public void setAndroidFirebaseServiceAccountJsonBytes(byte[] firebaseServiceAccountJsonBytes) Sets the Firebase service account JSON configuration bytes for the Android specific notification service. It is retrieved from the Google Firebase Console.- Parameters:
firebaseServiceAccountJsonBytes
- the stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
getAndroidFirebaseServiceAccountJsonBytes
public byte[] getAndroidFirebaseServiceAccountJsonBytes()Gets the bytes of the Firebase service account JSON configuration file to be used during the communication with the server.- Returns:
- the input stream of the Firebase service account JSON configuration file to be used during the communication with the server
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, String p12CertificatePath, String p12CertificatePassword) Sets the credentials for the certificate-based authentication on the iOS platform.- Parameters:
useDevelopmentServer
- specify if the development server must be usedp12CertificatePath
- path to the p12 file containing the certificate to be used for the authentication with the serverp12CertificatePassword
- password of the p12 file
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, InputStream p12CertificateStream, String p12CertificatePassword) Sets the credentials for the certificate-based authentication on the iOS platform.- Parameters:
useDevelopmentServer
- specify if the development server must be usedp12CertificateStream
- input stream of the p12 file containing the certificate to be used for the authentication with the serverp12CertificatePassword
- password of the p12 file
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, String p8KeyPath, String keyId, String teamId) Sets the credentials for the token-based authentication on the iOS platform.- Parameters:
useDevelopmentServer
- specify if the development server must be usedp8KeyPath
- path to the p8 file containing the key to be used for the authentication with the serverkeyId
- ID of the key, can be retrieved from the Apple Developer accountteamId
- ID of the team, can be retrieved from the Apple Developer account
-
setiOSPlatformCredentials
public void setiOSPlatformCredentials(boolean useDevelopmentServer, InputStream p8KeyStream, String keyId, String teamId) Sets the credentials for the token-based authentication on the iOS platform.- Parameters:
useDevelopmentServer
- specify if the development server must be usedp8KeyStream
- input stream of the p8 file containing the key to be used for the authentication with the serverkeyId
- ID of the key, can be retrieved from the Apple Developer accountteamId
- ID of the team, can be retrieved from the Apple Developer account
-
usesiOSDevelopmentServer
public boolean usesiOSDevelopmentServer()Gets the status of the server to be used. The development server must be used for application development.- Returns:
- true if the development server shall be used
-
getiOSP12CertificatePath
Gets the path to the p12 file containing the certificate to be used for the authentication with the server- Returns:
- the path to the p12 file
-
getiOSP12CertificateStream
Gets the stream to the p12 file containing the certificate to be used for the authentication with the server- Returns:
- the stream of the p12 file
-
getiOSP12CertificatePassword
Gets the password of the p12 file- Returns:
- the password of the p12 file
-
getiOSP8KeyPath
Gets the path to the p8 file containing the key to be used for the authentication with the server- Returns:
- the path to the p8 file
-
getiOSP8KeyStream
Gets the stream to the p8 file containing the key to be used for the authentication with the server- Returns:
- the stream of the p8 file
-
getiOSKeyId
Gets the ID of the key- Returns:
- the ID of the key
-
getiOSTeamId
Gets the ID of the team- Returns:
- the ID of the team
-
getAndroidFirebaseServiceAccountJson()
instead.