How do I access Windows credentials from Java?

前端 未结 2 1336
后悔当初
后悔当初 2020-12-03 15:57

How do I (or can I?) retrieve the cached credentials for the currently logged-in Windows user in Java? I want to reuse these credentials in some other GSS-API calls. Specifi

2条回答
  •  广开言路
    2020-12-03 16:16

    If IIS has Integrated Windows Authentication turned on, then you can still access the protected page by using the http://spnego.sourceforge.net/api/net/sourceforge/spnego/SpnegoHttpURLConnection.html class. This open source project's "credential delegation" tutorial also uses the SpnegoHttpURLConnection class.

提交回复
热议问题