fromJson static method

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

Decodes the reply.

Implementation

static Identity fromJson(Map<String, dynamic> json) => Identity(
  principal: Json.optString(json, 'principal') ?? 'anonymous',
  roles: Json.optStringList(json, 'roles').toSet(),
  authenticated: Json.optBool(json, 'authenticated', fallback: true),
);