Class NotificationSDKServerCredentials

java.lang.Object
com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerCredentials

public class NotificationSDKServerCredentials extends Object
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
When using token-based authentication you need to provide:
  • 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 Details

    • NotificationSDKServerCredentials

      public NotificationSDKServerCredentials()
      Creates a NotificationSDKServerCredentials object. The platform specific attributes must be set using the dedicated methods.
  • Method Details

    • setAndroidPlatformCredentials

      @Deprecated public void setAndroidPlatformCredentials(String projectKey)
      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 public String getAndroidProjectKey()
      Deprecated.
      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

      public void setAndroidFirebaseServiceAccountJson(String firebaseServiceAccountJson)
      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

      public String 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

      public InputStream 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 used
      p12CertificatePath - path to the p12 file containing the certificate to be used for the authentication with the server
      p12CertificatePassword - 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 used
      p12CertificateStream - input stream of the p12 file containing the certificate to be used for the authentication with the server
      p12CertificatePassword - 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 used
      p8KeyPath - path to the p8 file containing the key to be used for the authentication with the server
      keyId - ID of the key, can be retrieved from the Apple Developer account
      teamId - 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 used
      p8KeyStream - input stream of the p8 file containing the key to be used for the authentication with the server
      keyId - ID of the key, can be retrieved from the Apple Developer account
      teamId - 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

      public String 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

      public InputStream 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

      public String getiOSP12CertificatePassword()
      Gets the password of the p12 file
      Returns:
      the password of the p12 file
    • getiOSP8KeyPath

      public String 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

      public InputStream 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

      public String getiOSKeyId()
      Gets the ID of the key
      Returns:
      the ID of the key
    • getiOSTeamId

      public String getiOSTeamId()
      Gets the ID of the team
      Returns:
      the ID of the team