AuthToken.fromMap constructor

AuthToken.fromMap(
  1. Map<String, dynamic> data
)

Implementation

factory AuthToken.fromMap(Map<String, dynamic> data) {
  return AuthToken(
      ipAddress: data['aud'].toString(),
      lifeSpan: data['exp'] as num,
      issuedAt: DateTime.parse(data['iat'].toString()),
      userId: data['sub'],
      payload: data['pld']);
}