Package com.globalmentor.net
Class AbstractAuthenticable
- java.lang.Object
-
- com.globalmentor.net.AbstractAuthenticable
-
- All Implemented Interfaces:
Authenticable
- Direct Known Subclasses:
DefaultPasswordAuthenticable
public abstract class AbstractAuthenticable extends java.lang.Object implements Authenticable
Abstract authenticator implementation.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.PasswordAuthentication
getPasswordAuthentication(java.lang.String prompt)
Determines password information in relation to a given description.java.net.PasswordAuthentication
getPasswordAuthentication(java.net.URI uri, java.lang.String prompt)
Determines password information in relation to a given URI and description.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.globalmentor.net.Authenticable
getPasswordAuthentication
-
-
-
-
Method Detail
-
getPasswordAuthentication
public java.net.PasswordAuthentication getPasswordAuthentication(java.lang.String prompt)
Determines password information in relation to a given description. This version delegates togetPasswordAuthentication(URI, String)
.- Specified by:
getPasswordAuthentication
in interfaceAuthenticable
- Parameters:
prompt
- A description of the authentication.- Returns:
- The password authentication collected from the user, or
null
if none is provided.
-
getPasswordAuthentication
public java.net.PasswordAuthentication getPasswordAuthentication(java.net.URI uri, java.lang.String prompt)
Determines password information in relation to a given URI and description. This version delegates toAuthenticable.getPasswordAuthentication(URI, String, String)
.- Specified by:
getPasswordAuthentication
in interfaceAuthenticable
- Parameters:
uri
- The URI for which authentication is requested, ornull
if there is no relevant URI.prompt
- A description of the authentication.- Returns:
- The password authentication collected from the user, or
null
if none is provided.
-
-