Authorization class

Annotations
  • @JsonSerializable()

Constructors

Authorization({required AuthorizationType type, required String token, required DateTime expiredAt, String? payload})
Creates a new Authorization instance.
const
Authorization.access({required String token, required DateTime expiredAt, String? payload})
Create a AuthorizationType.access authorization instance.
factory
Authorization.fromJson(Map<String, dynamic> json)
Factory constructor for creating a new Authorization instance
factory
Authorization.refresh({required String token, required DateTime expiredAt, String? payload})
Create a AuthorizationType.refresh authorization instance.
factory

Properties

expiredAt DateTime
final
hashCode int
The hash code for this object.
no setterinherited
payload String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
final
type AuthorizationType
final

Methods

copyWith({String? token, DateTime? expiredAt, String? payload}) Authorization
Copy with new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Create a JSON Object for this Authorization instance.
toString() String
To String.
override

Operators

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