TokenSettings.fromYaml constructor

TokenSettings.fromYaml(
  1. YamlMap yaml
)

Implementation

factory TokenSettings.fromYaml(YamlMap yaml) {
  final key = yaml['key'];
  final issuer = yaml['issuer'];
  final audience = yaml['audience'];
  final secondsToLive = yaml['secondsToLive'] ?? 3600;
  final ret = TokenSettings(
    key: key,
    issuer: issuer,
    audience: audience,
    secondsToLive: secondsToLive,
  );
  return ret;
}