RFR: 8169068: Add a new method: java.net.Authenticator.getDefault()

Daniel Fuchs daniel.fuchs at oracle.com
Thu Nov 3 10:20:40 UTC 2016


Hi,

Please find below a patch for:

RFR: 8169068: Add a new method: java.net.Authenticator.getDefault()
https://bugs.openjdk.java.net/browse/JDK-8169068

The method implementation itself is trivial.
The API documentation is derived from that of Authenticator::setDefault

The method checks for the existing
   NetPermission("requestPasswordAuthentication")
rather than introducing a new "getDefaultAuthenticator" permission,
because getting the authenticator actually grants you the possibilty
to request passwords - so it's better that the permission check
makes it explicit.

http://cr.openjdk.java.net/~dfuchs/webrev_8169068/webrev.00/


best regards,

-- daniel


More information about the net-dev mailing list