| java.lang.Object | |
| ↳ | java.net.Authenticator | 
An implementation of this class is able to obtain authentication information for a connection in several ways. For this purpose it has to set the default authenticator which extends Authenticator by setDefault(Authenticator a). Then it should override getPasswordAuthentication() which dictates how the authentication info is obtained. Usually, it prompts the user for the required input.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | Authenticator.RequestorType | Enumeration class for the origin of the authentication request. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  |  | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Invokes the methods of the registered authenticator to get the authentication info.
           | ||||||||||
|  | 
           Invokes the methods of the registered authenticator to get the authentication info.
           | ||||||||||
|  | 
           Invokes the methods of the registered authenticator to get the authentication info.
           | ||||||||||
|  | 
           Sets 
            aas the default authenticator. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Returns the collected username and password for authorization.
           | ||||||||||
|  | 
           Returns the host name of the connection that requests authentication or 
            nullif unknown. | ||||||||||
|  | 
           Returns the port of the connection that requests authorization.
           | ||||||||||
|  | 
           Returns the realm (prompt string) of the connection that requests authorization.
           | ||||||||||
|  | 
           Returns the protocol of the connection that requests authorization.
           | ||||||||||
|  | 
           Returns the scheme of the connection that requests authorization, for example HTTP Basic Authentication.
           | ||||||||||
|  | 
           Returns the address of the connection that requests authorization or 
            nullif unknown. | ||||||||||
|  | 
           Returns the URL of the authentication request.
           | ||||||||||
|  | 
           Returns the type of this request, it can be 
            PROXYorSERVER. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.lang.Object | |||||||||||
Invokes the methods of the registered authenticator to get the authentication info.
| rHost | host name of the connection that requests authentication. | 
|---|---|
| rAddr | address of the connection that requests authentication. | 
| rPort | port of the connection that requests authentication. | 
| rProtocol | protocol of the connection that requests authentication. | 
| rPrompt | realm of the connection that requests authentication. | 
| rScheme | scheme of the connection that requests authentication. | 
null if no authenticator exists.Invokes the methods of the registered authenticator to get the authentication info.
| rHost | host name of the connection that requests authentication. | 
|---|---|
| rAddr | address of the connection that requests authentication. | 
| rPort | port of the connection that requests authentication. | 
| rProtocol | protocol of the connection that requests authentication. | 
| rPrompt | realm of the connection that requests authentication. | 
| rScheme | scheme of the connection that requests authentication. | 
| rURL | url of the connection that requests authentication. | 
| reqType | requestor type of the connection that requests authentication. | 
null if no authenticator exists.Invokes the methods of the registered authenticator to get the authentication info.
| rAddr | address of the connection that requests authentication. | 
|---|---|
| rPort | port of the connection that requests authentication. | 
| rProtocol | protocol of the connection that requests authentication. | 
| rPrompt | realm of the connection that requests authentication. | 
| rScheme | scheme of the connection that requests authentication. | 
null if no authenticator exists.Sets a as the default authenticator. It will be called whenever the realm that the URL is pointing to requires authorization.
| a | authenticator which has to be set as default. | 
|---|
Returns the collected username and password for authorization. The subclass has to override this method to return a value different to the default which is null. 
 Returns null by default.
Returns the host name of the connection that requests authentication or null if unknown.
null. Returns the port of the connection that requests authorization.
Returns the realm (prompt string) of the connection that requests authorization.
Returns the protocol of the connection that requests authorization.
Returns the scheme of the connection that requests authorization, for example HTTP Basic Authentication.
Returns the address of the connection that requests authorization or null if unknown.
Returns the URL of the authentication request.
Returns the type of this request, it can be PROXY or SERVER.