Пример #1
0
 public void Store(RequestState state)
 {
     throw new NotImplementedException();
 }
Пример #2
0
 public void Store(RequestState state)
 {
     throw new NotImplementedException();
 }
Пример #3
0
        protected OAuthRequest(
            EndPoint resourceEndPoint,
            OAuthService settings,
            string verifier,
            IRequestStateStore stateStore,
            RequestStateKey stateKey)
        {
            this.ResourceEndPoint = resourceEndPoint;
            this.Service = settings;
            this.RequestTokenVerifier = verifier;

            this.stateStore = stateStore;
            this.state = stateStore.Get(stateKey);
        }
Пример #4
0
        /// <summary>
        /// Creates a new OAuth protected request, initialised with previously
        /// retrieved request and access tokens, the specified callback  
        /// </summary>
        /// <remarks>
        /// If the access token is valid, the user should not have to intervene
        /// to authorize the request and the protected resource should be
        /// fetched immediately.
        /// </remarks>
        /// <param name="resourceEndPoint">Protected resource End Point</param>
        /// <param name="settings">Service settings</param>
        /// <param name="callbackUri">Callback uri</param>
        /// <param name="requestToken">Request token</param>
        /// <param name="verifier">Verifier</param>
        /// <param name="accessToken">Access token</param>
        /// <returns>An OAuth protected request for the protected resource,
        /// initialised with the request token and access token</returns>
        public static OAuthRequest Create(
            EndPoint resourceEndPoint,
            OAuthService settings,
            Uri callbackUri,
            IToken requestToken,
            string verifier,
            IToken accessToken)
        {
            var state = new RequestState(new RequestStateKey(settings, null))
            {
                RequestToken = requestToken,
                AccessToken = accessToken
            };

            var request = new OAuthRequest(resourceEndPoint, settings, verifier, state);
            request.CallbackUrl = callbackUri;
            return request;
        }
Пример #5
0
        protected OAuthRequest(
           EndPoint resourceEndPoint,
           OAuthService settings,
           string verifier,
           RequestState state)
        {
            this.ResourceEndPoint = resourceEndPoint;
            this.Service = settings;
            this.RequestTokenVerifier = verifier;

            this.state = state;
        }