Class SystemCertificateProvider

  • All Implemented Interfaces:
    com.sap.cloud.mobile.foundation.authentication.CertificateProvider

    
    public final class SystemCertificateProvider
     implements CertificateProvider
                        

    An implementation of the CertificateProvider that provides certificates available in the android.security.KeyChain.

    The first time a certificate is requested for a given host and port, this class will launch the Android UI necessary for the app to get permission to use the certificate the user selects. The user selection is saved in the AliasStore (if provided) and the certificate picker UI will not be shown again unless the AliasStore has that certificate cleared. Since different servers might require different credentials, the certificate selection is saved per host/port combination.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface SystemCertificateProvider.AliasStore

      An interface used for persisting the aliases the user has selected from the android.security.KeyChain.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit clear(String host, Integer port) Invoked if the certificate for the given host and port is rejected.
      Unit clear() Invoked if the user wishes to forget all certificates from the provider.
      Unit onCertificateRequest(CertificateRequest request) Invoked when a client certificate is requested.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clear

         Unit clear(String host, Integer port)

        Invoked if the certificate for the given host and port is rejected.

      • clear

         Unit clear()

        Invoked if the user wishes to forget all certificates from the provider.