コード例 #1
0
        public Authentication CreateAuthentication()
        {
            var body = new Authentication { Username = this.User, Password = this.Password, ApplicationToken = this.ApplicationToken };

            //AuthenticationResponse authenticationResponse = new AuthenticationResponse();
            Authentication retAuthentication = GenericPost<Authentication>("authentication", body);

            return retAuthentication;
        }
コード例 #2
0
        //public AuthenticationResponse GetAuthenticationAccessToken(string accesstoken)
        //{
        //    AuthenticationResponse authenticationResponse = new AuthenticationResponse();
        //    Authentication authentication = GenericPost<Authentication>(string.Format("access_token/{0}", accesstoken));
        //    authenticationResponse.Authentication = authentication;
        //    authenticationResponse.Authentication.AccessToken = (string)accesstoken;
        //    return authenticationResponse;
        //}
        public Authentication CreateAuthentication(string userName, string password, string applicationToken)
        {
            this.User = userName;
            this.Password = password;
            this.ApplicationToken = applicationToken;

            var body = new Authentication { Username = this.User, Password = this.Password, ApplicationToken=this.ApplicationToken };

            //AuthenticationResponse authenticationResponse = new AuthenticationResponse();
            Authentication retAuthentication = GenericPost<Authentication>("authentication", body);

            return retAuthentication;
        }