Exemplo n.º 1
0
		internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestState state) {
			this.context = context;
			this.resourceEndPoint = resourceEndPoint;
			this.verifier = verifier;

			this.state = state;
		}
Exemplo n.º 2
0
 internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestStateKey stateKey)
 {
     this.context          = context;
     this.resourceEndPoint = resourceEndPoint;
     this.verifier         = verifier;
     state = context.RequestStateStore.Get(stateKey);
 }
Exemplo n.º 3
0
        internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestState state)
        {
            this.context          = context;
            this.resourceEndPoint = resourceEndPoint;
            this.verifier         = verifier;

            this.state = state;
        }
Exemplo n.º 4
0
        public void TestSuccess1()
        {
            OAuthService       service       = new OAuthService(new OAuthEndPoint(RequestTokenAddress), AuthorizationAddress, new OAuthEndPoint(AccessTokenAddress), Consumer);
            OAuthClientContext clientContext = new OAuthClientContext(service);

            clientContext.NonceGenerator = new GuidNonceGenerator();

            UriBuilder builder = new UriBuilder();

            builder.Scheme = Uri.UriSchemeHttp;
            builder.Host   = PathServiceAddress.Host;
            builder.Port   = PathServiceAddress.Port;
            builder.Path   = PathName;

            OAuthRequest  consumerRequest = clientContext.CreateRequest(new OAuthEndPoint(builder.ToString(), "GET"));
            OAuthResponse resource        = consumerRequest.GetResource();

            if (resource.HasProtectedResource)
            {
                //TODO:
            }
        }
Exemplo n.º 5
0
		internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestStateKey stateKey) {
			this.context = context;
			this.resourceEndPoint = resourceEndPoint;
			this.verifier = verifier;
			state = context.RequestStateStore.Get(stateKey);
		}
Exemplo n.º 6
0
        public void TestSuccess1()
        {
            OAuthService service = new OAuthService(new OAuthEndPoint(RequestTokenAddress), AuthorizationAddress, new OAuthEndPoint(AccessTokenAddress), Consumer);
            OAuthClientContext clientContext = new OAuthClientContext(service);
            clientContext.NonceGenerator = new GuidNonceGenerator();

            UriBuilder builder = new UriBuilder();
            builder.Scheme = Uri.UriSchemeHttp;
            builder.Host = PathServiceAddress.Host;
            builder.Port = PathServiceAddress.Port;
            builder.Path = PathName;

            OAuthRequest consumerRequest = clientContext.CreateRequest(new OAuthEndPoint(builder.ToString(), "GET"));
            OAuthResponse resource = consumerRequest.GetResource();

            if (resource.HasProtectedResource) {
                //TODO:
            }
        }