public async ValueTask <ActionResult> CheckTokenForUsability([FromRoute] string token, [FromServices] IAccessTokensLogsService logsService) { if (token is null || token.Length != 64) { return(BadRequest()); } var checkTokenResult = await _accessUsersTokensService.CanMakeRequestAsync(token); if (!checkTokenResult) { return(Forbid()); } await logsService.LogAsync(token); return(Ok()); }
public AccessTokensLogsController(IAccessTokensLogsService accessTokensLogsService) =>