public async Task <IActionResult> RevokeAll([FromRoute] string accountId,
                                                    [FromServices] IRevokeAllTokensForAccountCommand revokeAllTokensForAccountCommand)
        {
            try
            {
                //Validate rights

                await revokeAllTokensForAccountCommand.Execute(accountId);

                return(Ok(AuthServer.Common.Messages.Response.Success()));
            }
            catch (InsufficientPermissionsException ex)
            {
                return(Ok(AuthServer.Common.Messages.Response.Success()));
            }
            catch (Exception ex)
            {
                //Log error
                _logger.LogError("RefreshTokenController.RevokeAll", "Exception was thrown", new
                {
                    AccountId = accountId,
                    Exception = ex
                });

                return(BadRequest("Something went wrong"));
            }
        }
 public PasswordChangedEventRabbitMqConsumer(IRevokeAllTokensForAccountCommand revokeAllTokensForAccountCommand,
                                             IConnection rabbitMqConn,
                                             RabbitMqQueueConfig queueConfig,
                                             ILogger logger)
     : base(rabbitMqConn, queueConfig, logger)
 {
     _revokeAllTokensForAccountCommand = revokeAllTokensForAccountCommand;
 }