JwtPayload.fromJson constructor

JwtPayload.fromJson(
  1. Map<String, dynamic> json
)

Implementation

JwtPayload.fromJson(Map<String, dynamic> json) {
  sub = json['sub'];
  iss = json['iss'];
  exp = json['exp'] != null
      ? DateTime.fromMillisecondsSinceEpoch(json['exp'] * 1000)
      : null;
  iat = json['iat'] != null
      ? DateTime.fromMillisecondsSinceEpoch(json['iat'] * 1000)
      : null;
  aud = json['aud'];
  payload = json;
}