SPT Core API

com.sptci
Class SimpleAuthenticator

java.lang.Object
  extended by java.net.Authenticator
      extended by com.sptci.SimpleAuthenticator

public class SimpleAuthenticator
extends Authenticator

A simple authenticator implementation for a specified userName and password combination.

© Copyright 2007, Sans Pareil Technologies, Inc.

Version:
$Id: SimpleAuthenticator.java 4120 2008-05-25 20:49:48Z rakesh $
Author:
Rakesh Vidyadharan 2007-10-28

Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.Authenticator
Authenticator.RequestorType
 
Constructor Summary
SimpleAuthenticator(String userName, String password)
          Create a new instance of the authenticator using the specified credentials;
 
Method Summary
 String getPassword()
          Returns the value of password.
protected  PasswordAuthentication getPasswordAuthentication()
          Called when password authorization is needed.
 String getUserName()
          Returns the value of userName.
 
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAuthenticator

public SimpleAuthenticator(String userName,
                           String password)
Create a new instance of the authenticator using the specified credentials;

Parameters:
userName - The userName value to use.
password - The password value to use.
Method Detail

getPasswordAuthentication

protected PasswordAuthentication getPasswordAuthentication()
Called when password authorization is needed.

Overrides:
getPasswordAuthentication in class Authenticator
Returns:
The PasswordAuthentication specified in the initialiser.
See Also:
Authenticator.getPasswordAuthentication()

getUserName

public String getUserName()
Returns the value of userName.

Returns:
The user name used for authentication.

getPassword

public String getPassword()
Returns the value of password.

Returns:
The password used for authentication.

SPT Core API