Talsec class

A class which maintains all security related operations.

To get started, you can obtain the singleton instance of Talsec by calling the instance getter. Once you have a reference to the Talsec singleton, you can use it to access the various methods and streams provided by the class.

Talsec.instance;

The freeRASP communicates with the Talsec security system using a combination of MethodChannels and EventChannels.

Note that the Talsec singleton is initialized lazily, so it won't be created until it's actually needed. This means that the first time you call the instance getter, there may be a short delay while the Talsec singleton is initialized. However, subsequent calls to the instance getter will return the same singleton instance without any additional delay.

Constructors

Talsec.private(MethodChannel methodChannel, EventChannel eventChannel)
Private constructor for internal and testing purposes.

Properties

eventChannel EventChannel
EventChannel used to receive Threats from the native platform.
latefinal
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
MethodChannel used to interact with native platform.
latefinal
onThreatDetected Stream<Threat>
Returns a broadcast stream. When security is compromised onThreatDetected receives what type of Threat caused it.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachListener(ThreatCallback callback) → void
Attaches instance of ThreatCallback to Talsec. If ThreatCallback is already attached, current one will be detached and replaced with callback.
detachListener() → void
Removes instance of latest ThreatCallback. Also cancels StreamSubscription for that ThreatCallback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start(TalsecConfig config) Future<void>
Starts freeRASP with configuration provided in config.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance Talsec
Initialize Talsec lazily/obtain current instance of Talsec.
no setter