Comments (7)
OK, thanks for the response. I'll roll my own for now.
from auth0-java.
@lbalmaceda We have a similar requirement to call Auth0 through a forward proxy for ManagementAPI and AuthAPI.
Can the httpclient be exposed through a constructor so that I can set my own proxy?
from auth0-java.
No, there's no current support for Proxy
as I don't want to expose the OkHttp classes in the public API. Proxy class could be exposed as it's java.net, but if your proxy requires authentication you'd need to handle that error yourself. The way to do this using OkHttp is with a special Authenticator for the Proxy that sets the header in the request. We could create our own wrapper for that class and workaround it, but this is not a priority for us today.
I'll leave the issue open as a reminder. 👍
from auth0-java.
Would it be possible to solve this in 2 steps instead of 1. First step just expose ability to use proxy (without authentication). Second step handle the more complicated case of authenticated proxy.
I have a use case which needs a proxy (but not an authenticated one), so just solving the first case would be enough for me.
from auth0-java.
Echoing the request above, possibly doing something like this:
public ManagementAPI(String domain, String apiToken, OkHttpClient.Builder okHttpClientBuilder) {
Asserts.assertNotNull(domain, "domain");
Asserts.assertNotNull(apiToken, "api token");
Asserts.assertNotNull(okHttpClientBuilder, "okHttpClientBuilder");
this.baseUrl = createBaseUrl(domain);
if (baseUrl == null) {
throw new IllegalArgumentException("The domain had an invalid format and couldn't be parsed as an URL.");
}
this.apiToken = apiToken;
telemetry = new TelemetryInterceptor();
logging = new HttpLoggingInterceptor();
logging.setLevel(Level.NONE);
client = okHttpClientBuilder
.addInterceptor(logging)
.addInterceptor(telemetry)
.build();
}
from auth0-java.
@lbalmaceda I've raised another MR. #150 This one doesn't expose any okhttpclasses. It uses java.net.Proxy for proxy and java.net.PasswordAuthentication for proxy authentication.
from auth0-java.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️
from auth0-java.
Related Issues (20)
- Filter Users by role and metadata HOT 9
- TokenHolderDeserializer has no default (no arg) constructor HOT 4
- LogEvent doesn't have the fields returned from v2/logs endpoint. HOT 2
- RateLimitException contains wrong reset/limit and remaining information HOT 1
- use char[] instead of String for sensitive data HOT 3
- Allow exportUsers to select all users by omitting connection_id HOT 2
- Add groups and dn to User Pojo HOT 5
- Exposing a method in AuthAPI to delete MFA authenticators. HOT 3
- Invalidate remembered browsers missing from the SDK
- Library source does not match the bytecode for class AuthAPI HOT 3
- Impossible to update users from the API HOT 1
- Add `cross_origin_authentication` to the response model for the SDK
- Add roles to organization member call HOT 1
- Failed to parse log event HOT 2
- Add support for adding an MFA OOB Authenticator via the Email channel
- SDK fails to parse a response when "email_verified" is not a boolean
- Avoid unnecessary http client creation HOT 1
- When updating user it's not possible to unset optional fields HOT 1
- Unable to set token_endpoint_auth_method to null
- Update OkHttp to 5.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-java.