McpRequestState class
Seals and opens requestState values with HMAC-SHA256.
Constructors
-
McpRequestState(List<
int> key, {Duration ttl = const Duration(minutes: 5)}) -
keyis the server's secret; at least 32 bytes.
Properties
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
datafor a retry ofmethodbyprincipal.requestbinds 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