McpRequestState class

Seals and opens requestState values with HMAC-SHA256.

Constructors

McpRequestState(List<int> key, {Duration ttl = const Duration(minutes: 5)})
key is the server's secret; at least 32 bytes.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
ttl → Duration
How long sealed state stays valid.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String state, {required String? principal, required String method, Object? request, DateTime? now}) → Map<String, Object?>
The data sealed in state, or a RequestStateException when the state was altered, has expired, or belongs to another principal or request.
seal(Map<String, Object?> data, {required String? principal, required String method, Object? request, DateTime? now}) → String
Seal data for a retry of method by principal. request binds the state to the request's salient parameters (it is digested, not stored).
toString() → String
A string representation of this object.
inherited

Operators

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