Exemplo n.º 1
0
        /// <summary>
        ///		Añade los nodos de autentificación oAuth
        /// </summary>
        private void AddNodesAuthentificationOAuht(MLNode objMLNode, oAuthAuthenticator objAuthenticator)
        {
            MLNode objMLAuth = objMLNode.Nodes.Add(cnstStrTagAuthOAuth);

            objMLAuth.Nodes.Add(cnstStrTagAuthOAuthConsumerKey, objAuthenticator.ConsumerKey);
            objMLAuth.Nodes.Add(cnstStrTagAuthOAuthConsumerSecret, objAuthenticator.ConsumerSecret);
            objMLAuth.Nodes.Add(cnstStrTagAuthOAuthAccessToken, objAuthenticator.AccessToken);
            objMLAuth.Nodes.Add(cnstStrTagAuthOAuthAccessTokenSecret, objAuthenticator.AccessTokenSecret);
        }
Exemplo n.º 2
0
        /// <summary>
        ///		Carga los datos de autentificación plano
        /// </summary>
        private IAuthenticator LoadAuthenticationOAuth(MLNode objMLChild)
        {
            oAuthAuthenticator objAuthenticator = new oAuthAuthenticator();

            // Asigna los datos
            objAuthenticator.ConsumerKey       = objMLChild.Nodes[cnstStrTagAuthOAuthConsumerKey].Value;
            objAuthenticator.ConsumerSecret    = objMLChild.Nodes[cnstStrTagAuthOAuthConsumerSecret].Value;
            objAuthenticator.AccessToken       = objMLChild.Nodes[cnstStrTagAuthOAuthAccessToken].Value;
            objAuthenticator.AccessTokenSecret = objMLChild.Nodes[cnstStrTagAuthOAuthAccessTokenSecret].Value;
            // Devuelve el autentificador
            return(objAuthenticator);
        }