Esempio n. 1
0
        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 });
        }
Esempio n. 2
0
        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 });
        }
Esempio n. 3
0
 public async Task UnlockUser([FromBody] UnlockUserParameters parameters)
 {
     ValidateForEmptyParameters(parameters);
     await _authenticationService.UnlockUserAsync(parameters.UserName);
 }