sbuild::AuthConv Class Reference

Authentication conversation handler interface. More...

#include <sbuild-auth-conv.h>

Inheritance diagram for sbuild::AuthConv:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< AuthMessagemessage_list
 A list of messages.

Public Member Functions

 AuthConv ()
 The constructor.
virtual ~AuthConv ()
 The destructor.
virtual time_t get_warning_timeout ()=0
 Get the time at which the user will be warned.
virtual void set_warning_timeout (time_t timeout)=0
 Set the time at which the user will be warned.
virtual time_t get_fatal_timeout ()=0
 Get the time at which the conversation will be terminated with an error.
virtual void set_fatal_timeout (time_t timeout)=0
 Set the time at which the conversation will be terminated with an error.
virtual bool conversation (message_list &messages)=0
 Hold a conversation with the user.

Detailed Description

Authentication conversation handler interface.

This interface should be implemented by objects which handle interaction with the user during authentication.

This is a wrapper around the struct pam_conv PAM conversation interface, and is used by Auth when interacting with the user during authentication.

A simple implementation is provided in the form of AuthConvTty. However, more complex implementations might hook into an event loop for GUI widget system.

The interface allows the setting of optional warning timeout and fatal timeout values, which should default to 0 (not enabled). This is an absolute time after which a warning is displayed or the conversation ends with an error.


Member Function Documentation

virtual bool sbuild::AuthConv::conversation message_list messages  )  [pure virtual]
 

Hold a conversation with the user.

Each of the messages detailed in messages should be displayed to the user, asking for input where required. The type of message is indicated in the AuthMessage::type field of the AuthMessage. The AuthMessage::response field of the AuthMessage should be filled in if input is required.

Parameters:
messages the messages to display to the user, and responses to return to the caller.
Returns:
true on success, false on failure.

virtual time_t sbuild::AuthConv::get_fatal_timeout  )  [pure virtual]
 

Get the time at which the conversation will be terminated with an error.

Returns:
the time.

Implemented in sbuild::AuthConvTty.

virtual time_t sbuild::AuthConv::get_warning_timeout  )  [pure virtual]
 

Get the time at which the user will be warned.

Returns:
the time.

Implemented in sbuild::AuthConvTty.

virtual void sbuild::AuthConv::set_fatal_timeout time_t  timeout  )  [pure virtual]
 

Set the time at which the conversation will be terminated with an error.

Parameters:
timeout the time to set.

Implemented in sbuild::AuthConvTty.

virtual void sbuild::AuthConv::set_warning_timeout time_t  timeout  )  [pure virtual]
 

Set the time at which the user will be warned.

Parameters:
timeout the time to set.

Implemented in sbuild::AuthConvTty.


The documentation for this class was generated from the following files:
Generated on Thu Dec 29 17:20:04 2005 for schroot by  doxygen 1.4.5