claimsMap property

Map<String, dynamic> get claimsMap

Implementation

Map<String, dynamic> get claimsMap {
  var nbf = _getEpochSeconds(notBefore);
  var exp = _getEpochSeconds(expires);

  var map = <String, dynamic>{};
  _addClaimIfNotNull(map, 'name', name);
  _addClaimIfNotNull(map, 'sub', subject);
  _addClaimIfNotNull(map, 'username', username);
  _addClaimIfNotNull(map, 'iss', issuer);
  _addClaimIfNotNull(map, 'aud', audience);
  _addClaimIfNotNull(map, 'nbf', nbf);
  _addClaimIfNotNull(map, 'exp', exp);
  for (var claim in extra.entries) {
    _addClaimIfNotNull(map, claim.key, claim.value);
  }

  return map;
}