ntlm-authentication

How to make a NTML request with Alamofire 4.0?

好久不见. 提交于 2019-12-11 02:58:25
问题 These are request headers: let headers: HTTPHeaders = [ "Accept": "application/json", "username": "someUserName", "password": "aPasswordForSomeUserName" ] When making a request with below code it's giving me "Garbage at the end". However, when I checked the response with JSON parser online. It's a valid JSON. Alamofire.request("http://myserver/list.svc/random", headers: headers).responseJSON { response in print(response) } I also tried making a request like this : Alamofire.request("http:/

Outlook web add-in autentication failure for on-premise exchange

杀马特。学长 韩版系。学妹 提交于 2019-12-08 13:27:29
问题 I use Office.js 's getCallbackTokenAsync to load the token to pass to the backend. In the backend, I use EWS to retrieve the email data. Here is how I perform the authentication. ExchangeService service = new ExchangeService(); service.Url = new Uri(ewsUrl); //retrieved from getCallbackTokenAsync service.Credentials = new OAuthCredentials(ewsToken);// retrieved from getCallbackTokenAsync It works well in exchange online enviroment. However when tested in on-premise exchange server, I got this

How to create a NTLM authentication header to use with Alamofire?

血红的双手。 提交于 2019-12-08 13:09:47
问题 These are request headers: let userName = "someUserName" let password = "aPasswordForSomeUserName" var headers: HTTPHeaders = [ "Accept": "application/json", ] if let authorizationHeader = Request.authorizationHeader(user: userName, password: password) { headers[authorizationHeader.key] = authorizationHeader.value } So this is generating Authorization like this. Basic aC5paHFoOkulbXKhNpk43A== (I have modified it for security ). But when I make the same request in Advance Rest Client (a chrome