Ejemplo n.º 1
0
        public AuthKeysResponse GetAuthKeys(AuthKeysRequest request)
        {
            RestRequest restRequest = new RestRequest("Account/GetAuthKeys", Method.POST);

            restRequest.AddJsonBody(request);

            AuthKeysResponse response = _client.Execute <AuthKeysResponse>(restRequest).Data;

            return(response);
        }
Ejemplo n.º 2
0
        public AuthKeysResponse GetAuthKeys()
        {
            AuthKeysRequest request = new AuthKeysRequest
            {
                UserNr = GetUserAuthenticationData().UserNr
            };

            AuthKeysResponse response = _client.GetAuthKeys(request);

            return(response);
        }
        public AuthKeysResponse GetAuthKeys(AuthKeysRequest request)
        {
            AuthKeysResponse response = new AuthKeysResponse
            {
                Success = true,
                Error   = ""
            };

            try
            {
                List <User_Keys> keys = db.User_Keys.Where(k => k.UserNr == request.UserNr).ToList();
                response.AuthKeys = Mapper.Map <List <AuthKey> >(keys);
            }
            catch (Exception e)
            {
                _logger.ErrorFormat($"error happend error: {e.Message} stacktrace: {e.StackTrace}");
                response.Success = false;
                response.Error   = "An error occured in user creation please check logs for more details";
            }

            return(response);
        }
Ejemplo n.º 4
0
        public AuthKeysResponse GetAuthKeys([FromBody] AuthKeysRequest request)
        {
            AuthKeysResponse response = _accountFacade.GetAuthKeys(request);

            return(response);
        }