org.pf.security.authentication
Class AbstractAuthenticator

java.lang.Object
  extended by org.pf.security.authentication.AbstractAuthenticator

public abstract class AbstractAuthenticator
extends Object

This class implements (nearly) the same methods as java.net.Authenticator. Beyond that it provides public setter methods for all authentication relevant fields.

Version:
1.0
Author:
Manfred Duchrow

Constructor Summary
AbstractAuthenticator()
          Initialize the new instance with default values.
 
Method Summary
 PasswordAuthentication getPasswordAuthentication()
          Called when password authorization is needed.
 String getRequestingHost()
           
 int getRequestingPort()
           
 String getRequestingPrompt()
           
 String getRequestingProtocol()
           
 String getRequestingScheme()
           
 InetAddress getRequestingSite()
           
 void setRequestingHost(String newValue)
           
 void setRequestingPort(int newValue)
           
 void setRequestingPrompt(String newValue)
           
 void setRequestingProtocol(String newValue)
           
 void setRequestingScheme(String newValue)
           
 void setRequestingSite(InetAddress newValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAuthenticator

public AbstractAuthenticator()
Initialize the new instance with default values.

Method Detail

getRequestingHost

public String getRequestingHost()

setRequestingHost

public void setRequestingHost(String newValue)

getRequestingPort

public int getRequestingPort()

setRequestingPort

public void setRequestingPort(int newValue)

getRequestingPrompt

public String getRequestingPrompt()

setRequestingPrompt

public void setRequestingPrompt(String newValue)

getRequestingProtocol

public String getRequestingProtocol()

setRequestingProtocol

public void setRequestingProtocol(String newValue)

getRequestingScheme

public String getRequestingScheme()

setRequestingScheme

public void setRequestingScheme(String newValue)

getRequestingSite

public InetAddress getRequestingSite()

setRequestingSite

public void setRequestingSite(InetAddress newValue)

getPasswordAuthentication

public PasswordAuthentication getPasswordAuthentication()
Called when password authorization is needed. Subclasses should override the default implementation, which returns null.

Returns:
The PasswordAuthentication collected from the user, or null if none is provided.


Copyright © 2013 Manfred Duchrow Consulting & Software. All Rights Reserved.