Class HttpAuthenticator
- java.lang.Object
-
- java.net.Authenticator
-
- org.glassfish.appclient.client.acc.HttpAuthenticator
-
public class HttpAuthenticator extends Authenticator
This is the callback object that gets called when a protected resource needs to be accessed and authentication information is needed. Pops up a UI to input username and password.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.net.Authenticator
Authenticator.RequestorType
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
debug
-
Constructor Summary
Constructors Constructor Description HttpAuthenticator(AppClientSecurityInfo secInfo, AppClientSecurityInfo.CredentialType loginType)
Create the authenticator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PasswordAuthentication
getPasswordAuthentication()
This is called when authentication is needed for a protected web resource.-
Methods inherited from class java.net.Authenticator
getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
-
-
-
-
Field Detail
-
debug
public static final boolean debug
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpAuthenticator
public HttpAuthenticator(AppClientSecurityInfo secInfo, AppClientSecurityInfo.CredentialType loginType)
Create the authenticator.
-
-
Method Detail
-
getPasswordAuthentication
protected PasswordAuthentication getPasswordAuthentication()
This is called when authentication is needed for a protected web resource. It looks for the authentication data in the subject. If the data is not found then login is invoked on the login context.- Overrides:
getPasswordAuthentication
in classAuthenticator
-
-