SeoActionFormContextCodec class final

Issues and verifies one opaque HMAC-SHA256 action-form context token.

The secret is copied at construction and must contain between 32 and 128 bytes. Applications should create a fresh unpredictable secret for each local server lifetime or load one from their own secret storage. When tokenLifetime is set, the codec issues only expiring tokens and refuses unbounded or differently scoped tokens during verification.

Constructors

SeoActionFormContextCodec(List<int> secret, {Duration? tokenLifetime, DateTime clock()?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenLifetime → Duration?
Fixed validity policy for tokens issued and required by this codec.
final

Methods

issue({required String actionId, required Map<String, String> values}) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
verify({required String actionId, required String token}) → SeoActionFormContext?

Operators

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