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.
-
Constructor Summary
Constructors Constructor Description SystemCertificateProvider(SystemCertificateProvider.AliasStore aliasStore)
-
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. -
-
Constructor Detail
-
SystemCertificateProvider
SystemCertificateProvider(SystemCertificateProvider.AliasStore aliasStore)
-
-
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.
-
onCertificateRequest
Unit onCertificateRequest(CertificateRequest request)
Invoked when a client certificate is requested.
-
-
-
-