internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestState state) { this.context = context; this.resourceEndPoint = resourceEndPoint; this.verifier = verifier; this.state = state; }
internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestStateKey stateKey) { this.context = context; this.resourceEndPoint = resourceEndPoint; this.verifier = verifier; state = context.RequestStateStore.Get(stateKey); }
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: } }