AddBodyAccessToken() 공개 메소드

public AddBodyAccessToken ( string token ) : void
token string
리턴 void
예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }