2005/5/9

     
 

class Authenticator

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::net::Authenticator Class Reference

#include <Authenticator.h>

Inheritance diagram for acdk::net::Authenticator:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Public Member Functions

 Authenticator ()
 Do nothing constructor for subclasses to call.


Static Public Member Functions

void setDefault (IN(RAuthenticator) def_auth)
RPasswordAuthentication requestPasswordAuthentication (IN(RInetAddress) addr, int port, IN(RString) protocol, IN(RString) prompt, IN(RString) scheme)
 This method is called whenever a username and password for a given network operation is required.


Protected Member Functions

RInetAddress getRequestingSite ()
 This method returns the address of the site that is requesting authentication.

int getRequestingPort ()
 This method returns the _port of the site that is requesting authentication.

RString getRequestingProtocol ()
 This method returns the requesting protocol of the operation that is requesting authentication.

RString getRequestingPrompt ()
 Returns the prompt that should be used when requesting authentication information from the user.

RString getRequestingScheme ()
 This method returns the authentication scheme in use.

virtual RPasswordAuthentication getPasswordAuthentication ()
 This method is called whenever a request for authentication is made.


Private Attributes

RInetAddress _addr
int _port
RString _protocol
RString _prompt
RString _scheme

Static Private Attributes

RAuthenticator _default_authenticator

Constructor & Destructor Documentation

acdk::net::Authenticator::Authenticator  )  [inline]
 

Do nothing constructor for subclasses to call.


Member Function Documentation

virtual RPasswordAuthentication acdk::net::Authenticator::getPasswordAuthentication  )  [inline, protected, virtual]
 

This method is called whenever a request for authentication is made.

It can call the other getXXX methods to determine the information relevant to this request. Subclasses should override this method, which returns null by default.

Returns:
The PasswordAuthentication information

int acdk::net::Authenticator::getRequestingPort  )  [inline, protected]
 

This method returns the _port of the site that is requesting authentication.

Returns:
The requesting _port

RString acdk::net::Authenticator::getRequestingPrompt  )  [inline, protected]
 

Returns the prompt that should be used when requesting authentication information from the user.

Returns:
The user prompt

RString acdk::net::Authenticator::getRequestingProtocol  )  [inline, protected]
 

This method returns the requesting protocol of the operation that is requesting authentication.

Returns:
The requesting protocol

RString acdk::net::Authenticator::getRequestingScheme  )  [inline, protected]
 

This method returns the authentication scheme in use.

Returns:
The authentication scheme

RInetAddress acdk::net::Authenticator::getRequestingSite  )  [inline, protected]
 

This method returns the address of the site that is requesting authentication.

Returns:
The requesting site

RPasswordAuthentication acdk::net::Authenticator::requestPasswordAuthentication IN(RInetAddress)  addr,
int  port,
IN(RString)  protocol,
IN(RString)  prompt,
IN(RString)  scheme
[static]
 

This method is called whenever a username and password for a given network operation is required.

First, a security check is made to see if the caller has the " permission. If not, the method thows an exception. If there is no default Authenticator object, the method then returns null. Otherwise, the default authenticators's instance variables are initialized and it's getPasswordAuthentication method is called to get the actual authentication information to return.

Parameters:
_addr The address requesting authentication
_port The _port requesting authentication
protocol The protocol requesting authentication
prompt The prompt to display to the user when requesting authentication info
scheme The authentication scheme in use
Returns:
A PasswordAuthentication object with the user's authentication info
Exceptions:
SecurityException If the caller does not have permission to perform this operation

void acdk::net::Authenticator::setDefault IN(RAuthenticator)  def_auth  )  [static]
 


Member Data Documentation

RInetAddress acdk::net::Authenticator::_addr [private]
 

RAuthenticator acdk::net::Authenticator::_default_authenticator [static, private]
 

int acdk::net::Authenticator::_port [private]
 

RString acdk::net::Authenticator::_prompt [private]
 

RString acdk::net::Authenticator::_protocol [private]
 

RString acdk::net::Authenticator::_scheme [private]