예제 #1
0
        public IApiResponseContextDto <ApplicationUserContext> Register(RegisterApplicationUserDto dto)
        {
            var result =
                ConnectorCalls.Post <RegisterApplicationUserDto, ApplicationUserContext>(_connectorClient, dto,
                                                                                         @"Authentication/Register");

            //if (!result.Errors.Any())
            //Settings.SetToken(result.Result);

            return(result);
        }
예제 #2
0
        public IApiResponseContextDto <ApplicationUserContext> GetToken(GetTokenRequest request)
        {
            var result =
                ConnectorCalls.Post <GetTokenRequest, ApplicationUserContext>(_connectorClient, request,
                                                                              @"Authentication/RequestToken");

            if (!result.HasErrors())
            {
                _connectorClient.SetToken(result.Result.Token);
            }

            return(result);
        }