question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.net.Authenticator support

See original GitHub issue

There is a standard way to authenticate against servers and proxies, which is the java.net.Authenticator. While you provide a way to set a Proxy or a ProxySelector directly, as default fallback you use the system default proxy selector.

It would be very nice if you could also use the “System default Authenticator” if none is set explicitly and also support setting a java.net.Authenticator explicitly instead of your own okhttp3.Authenticator.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
swankjessecommented, Sep 3, 2018

I’d love to talk to users & operators before adding new behavior. We want to be secure-by-default and that might mean not supporting BASIC auth over a plaintext channel, even if that was common once upon a time.

0reactions
yschimkecommented, Apr 25, 2020

And maybe moving the JavaNetAuthenticator out of okhttp-urlconnection into okhttp as it is not URLConnection specific and hopefully should not be removed once okhttp-urlconnection gets removed due to being deprecated. (And maybe JavaNetCookieJar alongside)

Done in https://github.com/square/okhttp/pull/5978

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authenticator (Java Platform SE 8 ) - Oracle Help Center
The class Authenticator represents an object that knows how to obtain authentication for a network connection. Usually, it will do this by prompting...
Read more >
Authenticator - Android Developers
The class Authenticator represents an object that knows how to obtain authentication for a network connection. Usually, it will do this by prompting...
Read more >
Uses of Class java.net.Authenticator - IBM
This method sets a to be the default authenticator. Overview · Package · Class, Use, Tree · Deprecated · Index · Help ......
Read more >
Java.net.authenticator not working on JAVA6 - Stack Overflow
I was using below code in my webservice to hit a NTLM protected URL but this Authenticator class is only functional in Java...
Read more >
A Quick Glance of Java Authenticator | Examples - eduCBA
net.Authenticator class in the subclass. Usually, this function contains getXXX() functions to get information from users for authentication like username and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found