public void UnlockUser(UnlockUserParameters parameters) { if (parameters == null) { throw new ClientException("It is not allowed to call this authentication service method with no parameters provided."); } _logger.Trace(() => "UnlockUser: " + parameters.UserName); CheckPermissions(AuthenticationServiceClaims.UnlockUserClaim); parameters.Validate(); string sql = string.Format(UnlockUserSql, SqlUtility.QuoteText(parameters.UserName)); _sqlExecuter.Value.ExecuteSql(new[] { sql }); }
public void UnlockUser(UnlockUserParameters parameters) { if (parameters == null) throw new ClientException("It is not allowed to call this authentication service method with no parameters provided."); _logger.Trace(() => "UnlockUser: " + parameters.UserName); CheckPermissions(AuthenticationServiceClaims.UnlockUserClaim); parameters.Validate(); string sql = string.Format(UnlockUserSql, SqlUtility.QuoteText(parameters.UserName)); _sqlExecuter.Value.ExecuteSql(new[] { sql }); }
public async Task UnlockUser([FromBody] UnlockUserParameters parameters) { ValidateForEmptyParameters(parameters); await _authenticationService.UnlockUserAsync(parameters.UserName); }