TrustPinSDKPlatform class abstract
The platform interface for the TrustPin SDK plugin.
Platform-specific implementations should extend this class and override all methods. The default implementation uses MethodChannelTrustPinSDK.
- Inheritance
-
- Object
- PlatformInterface
- TrustPinSDKPlatform
- Implementers
Constructors
- TrustPinSDKPlatform()
- Constructs a TrustPinSDKPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
logEvents
→ Stream<
Map< Object?, Object?> > -
A broadcast stream of raw SDK log-message maps produced by the native
SDK's global log sink.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validationEvents
→ Stream<
Map< Object?, Object?> > -
A broadcast stream of raw pin-validation verdict maps produced by the
native SDK's global validation listener.
no setter
Methods
-
awaitConfiguration(
{int? timeoutMs, String? instanceId}) → Future< void> - Waits until the pinning configuration has been fetched, signature- verified, and accepted by the SDK's integrity check — the explicit fail-closed gate that complements the now non-blocking setup.
-
fetchCertificate(
String host, {int port = 443, int? timeoutMs, String? instanceId}) → Future< String> -
Fetches the TLS leaf certificate from
hostas a PEM string. -
isConfigurationLoaded(
{String? instanceId}) → Future< bool> -
Returns
truewhen a validated pinning payload is cached and usable without a new fetch. Pure state read — never triggers a fetch or blocks. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setLogLevel(
String logLevel, {String? instanceId}) → Future< void> - Sets the logging verbosity level.
-
setup(
String organizationId, String projectId, String publicKey, {Uri? configurationURL, String mode = 'strict', String? instanceId}) → Future< void> - Initializes the TrustPin SDK with the given credentials.
-
setupWithNativeBundle(
{String? iosFileName, String? androidFileName, String? macosFileName, String? instanceId}) → Future< void> -
Initializes the TrustPin SDK by loading credentials from a platform
bundle file at the native layer. The Dart side never reads or parses the
file; iOS/macOS read a Plist via
TrustPinConfiguration.fromPlist, Android reads a JSON asset viaTrustPinConfiguration.fromAssets. -
toString(
) → String -
A string representation of this object.
inherited
-
validateConnection(
String host, {int port = 443, int? timeoutMs, String? instanceId}) → Future< void> -
Atomically validates that
host:portpresents a certificate matching the configured pins. The platform composesfetchCertificateandverifyinside a single channel call, so the certificate never enters the Dart isolate. -
verify(
String domain, String certificate, {String? instanceId}) → Future< void> -
Verifies a PEM certificate against configured pins for
domain.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ TrustPinSDKPlatform
-
The default instance of TrustPinSDKPlatform to use.
getter/setter pair