/// <summary> /// Client-directed single sign on (POST with access token) /// </summary> public void Login(MobileServiceAuthenticationProvider provider, string token, Action <IRestResponse <MobileServiceUser> > callback = null) { string p = provider.ToString().ToLower(); string uri = IsAppService() ? ".auth/login/" + p : "login/" + p; ZumoRequest request = new ZumoRequest(this, uri, Method.POST); Debug.Log("Login Request Uri: " + uri + " access token: " + token); request.AddBodyAccessToken(token); this.ExecuteAsync(request, callback); }
/// <summary> /// Client-directed single sign on (POST with access token) /// </summary> public IEnumerator Login(MobileServiceAuthenticationProvider provider, string token, Action <IRestResponse <MobileServiceUser> > callback = null) { string p = provider.ToString().ToLower(); string url = string.Format("{0}/.auth/login/{1}", AppUrl, p); Debug.Log("Login Request Url: " + url + " access token: " + token); ZumoRequest request = new ZumoRequest(this, url, Method.POST); request.AddBodyAccessToken(token); yield return(request.request.Send()); request.ParseJson <MobileServiceUser> (callback); }