Session class
Represents a user session.
A session includes data about the authenticated user, including their DID, handle, email, and the access and refresh JSON Web Tokens (JWT).
- Annotations
-
- @freezed
Constructors
-
Session({required String did, required String handle, String? email, @JsonKey(name: 'emailConfirmed') @Default(false) bool isEmailConfirmed, @Default(false) bool emailAuthFactor, required String accessJwt, required String refreshJwt, Map<
String, dynamic> ? didDoc}) -
Creates a new instance of Session.
constfactory
-
Session.fromJson(Map<
String, Object?> json) -
Creates a new instance of Session from a JSON object.
factory
Properties
- accessJwt → String
-
Access JSON Web Token.
no setterinherited
- accessToken → AuthToken
-
Returns decoded accessJwt.
no setter
-
copyWith
→ $SessionCopyWith<
Session> -
no setterinherited
- did → String
-
Decentralized Identifier for the user.
no setterinherited
-
didDoc
→ Map<
String, dynamic> ? -
DID plc document.
no setterinherited
- email → String?
-
User's email address.
no setterinherited
- emailAuthFactor → bool
-
no setterinherited
- handle → String
-
User handle.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmailConfirmed → bool
-
A flag indicating whether the email address is confirmed.
no setterinherited
- refreshJwt → String
-
Refresh JSON Web Token.
no setterinherited
- refreshToken → AuthToken
-
Returns decoded refreshJwt.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited