public OAuthRequest CreateRequest(OAuthEndPoint resourceEndPoint, Uri callbackUri, string verifier, string endUserId) { OAuthRequest request = new OAuthRequest(this, resourceEndPoint, verifier, new RequestStateKey(Service, endUserId)); request.CallbackUrl = callbackUri; return request; }
public OAuthRequest CreateRequest(OAuthEndPoint resourceEndPoint, Uri callbackUri, string verifier, string endUserId) { OAuthRequest request = new OAuthRequest(this, resourceEndPoint, verifier, new RequestStateKey(Service, endUserId)); request.CallbackUrl = callbackUri; return(request); }
public OAuthRequest CreateRequest(OAuthEndPoint resourceEndPoint, Uri callbackUri, IToken requestToken, string verifier, IToken accessToken) { RequestState state = new RequestState(new RequestStateKey(Service, null)); state.RequestToken = requestToken; state.AccessToken = accessToken; OAuthRequest request = new OAuthRequest(this, resourceEndPoint, verifier, state); request.CallbackUrl = callbackUri; return(request); }
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: } }
public OAuthRequest CreateRequest(OAuthEndPoint resourceEndPoint, Uri callbackUri, IToken requestToken, string verifier, IToken accessToken) { RequestState state = new RequestState(new RequestStateKey(Service, null)); state.RequestToken = requestToken; state.AccessToken = accessToken; OAuthRequest request = new OAuthRequest(this, resourceEndPoint, verifier, state); request.CallbackUrl = callbackUri; return request; }