Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose proxy options of request package #16

Closed
atrniv opened this issue Jun 6, 2014 · 4 comments
Closed

Expose proxy options of request package #16

atrniv opened this issue Jun 6, 2014 · 4 comments

Comments

@atrniv
Copy link

atrniv commented Jun 6, 2014

Hi, I'm trying to use the simple-oauth2 client from behind a squid proxy and i need to be able to set the proxy option on the request module. It would be great if you could expose it somehow on the simple-oauth2 package.

@andreareginato
Copy link
Collaborator

Hi @atrniv, sorry for the late answer. Did you finally made it?

@atrniv
Copy link
Author

atrniv commented Oct 24, 2014

I made the changes on my own fork along with a few others to support using self signed SSL certificates which required an upgrade of the request package. I also changed the behaviour of the access token create function to support serialization/deserialization of the access token from a session store.

@jonathansamines
Copy link
Collaborator

Since it hasn´t been requested again, i will close this. Feel free to open it again if it is still an issue.

@siboulet
Copy link

siboulet commented Feb 19, 2019

In case someone else is looking at how to use this library with an HTTP proxy, you can use the http option to pass https-proxy-agent as agent to the internal http library used by simple-oauth2 (wreck).

const HttpsProxyAgent = require('https-proxy-agent');

let oauth = OAuth2.create({
  client: {
  },
  auth: {
  },
  http: {
    agent: new HttpsProxyAgent('http://127.0.0.1:8888'),
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants