userWithGuard method

Future<Authenticatable> userWithGuard(
  1. String guardName,
  2. String token
)

Verifies a token with a specific guard

guardName The guard to use for verification token The token to verify Returns the authenticated user

Implementation

Future<Authenticatable> userWithGuard(
  String guardName,
  String token,
) async {
  final guard = _getOrCreateGuard(guardName);
  return guard.user(token);
}