apply method
Implementation
Future<String> apply(
AuthMode mode, {
String? factor,
Duration? duration,
Context? ctx,
}) async {
await ready();
final token = await _tokenizer.apply(
factor?.isNotEmpty == true ? factor! : mode.wireName,
duration ?? const Duration(minutes: 5),
ctx: ctx,
);
if (token?.isEmpty ?? true) {
throw Status.unauthorized.err();
}
return token!;
}