コード例 #1
0
        public void FetchTokenFromJWTAsync(string jwt, IAuthenticator authenticator, Action <WebexApiEventArgs <JWTAccessTokenInfo> > completionHandler)
        {
            var request = new ServiceRequest(authenticator)
            {
                Method   = HttpMethod.POST,
                Resource = "jwt/login"
            };

            request.AddHeaders("Authorization", jwt);

            request.ExecuteAuth <JWTAccessTokenInfo>((response) =>
            {
                completionHandler(response);
            });
        }
コード例 #2
0
        public void FetchTokenFromJWTAsync(string jwt, IAuthenticator authenticator, Action <WebexApiEventArgs <JWTAccessTokenInfo> > completionHandler)
        {
            var request = new ServiceRequest(authenticator)
            {
                Method   = HttpMethod.POST,
                Resource = "jwt/login"
            };

            request.AddHeaders("Authorization", jwt);
            request.AddBodyParameters("Content-Type", "text/plain");
            request.AddBodyParameters("Cache-Control", "no-cache");
            request.AddBodyParameters("Accept-Encoding", "none");

            request.ExecuteAuth <JWTAccessTokenInfo>((response) =>
            {
                completionHandler(response);
            });
        }