Package com.globalmentor.net
Interface Authenticable
-
- All Known Implementing Classes:
AbstractAuthenticable
,DefaultPasswordAuthenticable
public interface Authenticable
Presents a method for retrieving user authentication credentials.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Abstract 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.java.net.PasswordAuthentication
getPasswordAuthentication(java.net.URI uri, java.lang.String prompt, java.lang.String username)
Determines password information for a given user in relation to a given URI and description.
-
-
-
Method Detail
-
getPasswordAuthentication
java.net.PasswordAuthentication getPasswordAuthentication(java.lang.String prompt)
Determines password information in relation to a given description.- Parameters:
prompt
- A description of the authentication.- Returns:
- The password authentication collected from the user, or
null
if none is provided.
-
getPasswordAuthentication
java.net.PasswordAuthentication getPasswordAuthentication(java.net.URI uri, java.lang.String prompt)
Determines password information in relation to a given URI and description.- 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.
-
getPasswordAuthentication
java.net.PasswordAuthentication getPasswordAuthentication(java.net.URI uri, java.lang.String prompt, java.lang.String username)
Determines password information for a given user in relation to a given URI and description. The user must not be allowed to change the username, if one is provided.- Parameters:
uri
- The URI for which authentication is requested, ornull
if there is no relevant URI.prompt
- A description of the authentication.username
- The user for which password information should be gathered, ornull
if the username is not restricted.- Returns:
- The password authentication collected from the user, or
null
if none is provided.
-
-