Exemple #1
0
        /// <summary>
        /// Get the specific refresh token for the current application.
        /// </summary>
        /// <param name="refreshToken">The refresh token.</param>
        /// <returns>The token; else null.</returns>
        protected Nequeo.DataAccess.CloudInteraction.Data.OAuthToken GetSpecificRefreshToken(string refreshToken)
        {
            // Get the token data.
            Nequeo.DataAccess.CloudInteraction.Data.Extension.OAuthToken tokenExt   = new Nequeo.DataAccess.CloudInteraction.Data.Extension.OAuthToken();
            Nequeo.DataAccess.CloudInteraction.Data.OAuthToken           oAuthToken = tokenExt.Select.SelectDataEntity(
                u =>
                (u.TokenSecret == refreshToken));

            // Return the token.
            return(oAuthToken);
        }
Exemple #2
0
        /// <summary>
        /// Get the specific token for the current application.
        /// </summary>
        /// <param name="consumerKey">The consumerKey.</param>
        /// <param name="token">The token.</param>
        /// <returns>The token; else null.</returns>
        protected Nequeo.DataAccess.CloudInteraction.Data.OAuthToken GetSpecificToken(string consumerKey, string token)
        {
            // Get the token data.
            Nequeo.DataAccess.CloudInteraction.Data.Extension.OAuthToken tokenExt   = new Nequeo.DataAccess.CloudInteraction.Data.Extension.OAuthToken();
            Nequeo.DataAccess.CloudInteraction.Data.OAuthToken           oAuthToken = tokenExt.Select.SelectDataEntity(
                u =>
                (u.Context == consumerKey) &&
                (u.Token == token));

            // Return the token.
            return(oAuthToken);
        }