Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Dv::Ticket::Cgi Class Reference

A specialization of Dv::Cgi::Cgi, which transparently verifies the user identity, using a login.cgi server. More...

#include <cgi.h>

Inheritance diagram for Dv::Ticket::Cgi:

Inheritance graph
[legend]
Collaboration diagram for Dv::Ticket::Cgi:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Cgi (const std::string &name, const std::string &login_url, const std::string &default_language, bool ssl_only=false, const std::string &type="text/html", bool debug=false) throw ()
 Constructor.
 ~Cgi ()
 Destructor.
Dv::Ticket::Ticket::Ref ticket () const
const Dv::Ticket::Useruser () const
bool is_ssl () const
const std::string & language () const

Static Public Attributes

static const char * TICKET
 Name of cookie.
static const char * SERVER_HOST
 Name of cookie.
static const char * SERVER_PORT
 Name of cookie.
static const char * LANGUAGE
 Name of cookie.

Private Attributes

Dv::Ticket::Ticket::Ref ticket_
 the ticket, identifying an authenticated user (or, possibly, an anonymous user), associated with this CGI object
bool is_ssl_
 true iff this cgi program must be accessed only using SSL connections
std::string language_
 language to communicate with the user

Detailed Description

A specialization of Dv::Cgi::Cgi, which transparently verifies the user identity, using a login.cgi server.

One of the advantages of this class is that the cgi program never needs to handle or know passwords.

Definition at line 17 of file cgi.h.


Constructor & Destructor Documentation

Dv::Ticket::Cgi::Cgi const std::string &  name,
const std::string &  login_url,
const std::string &  default_language,
bool  ssl_only = false,
const std::string &  type = "text/html",
bool  debug = false
throw ()
 

Constructor.

Upon success, the identity of the use is known.

Parameters:
name of application.
login_url (suffix) where login server runs. Should be such that https://login_url is a well-formed (and valid!) url.
default_language 2-letter ISO code of default language to be used (may be switched by user when logging in via login.cgi)
ssl_only if true, non-SSL connections will be redirected to the https-version of the same url.
type mime type to be returned by this cgi program.
debug if true, header() will have debug flag set.

Dv::Ticket::Cgi::~Cgi  )  [virtual]
 

Destructor.

Reimplemented from Dv::Cgi::Cgi.


Member Function Documentation

Dv::Ticket::Ticket::Ref Dv::Ticket::Cgi::ticket  )  const [inline]
 

Returns:
Ticket or 0 if none.

Definition at line 45 of file cgi.h.

References ticket_.

const Dv::Ticket::User& Dv::Ticket::Cgi::user  )  const [inline]
 

Returns:
user owning ticket corresponding to cookie.

Definition at line 47 of file cgi.h.

References ticket_.

bool Dv::Ticket::Cgi::is_ssl  )  const [inline]
 

Returns:
true iff we were called using https.

Definition at line 49 of file cgi.h.

References is_ssl_.

const std::string& Dv::Ticket::Cgi::language  )  const [inline]
 

Returns:
value of language cookie, default is "nl".

Definition at line 51 of file cgi.h.

References language_.


Member Data Documentation

const char* Dv::Ticket::Cgi::TICKET [static]
 

Name of cookie.

Definition at line 20 of file cgi.h.

const char* Dv::Ticket::Cgi::SERVER_HOST [static]
 

Name of cookie.

Definition at line 22 of file cgi.h.

const char* Dv::Ticket::Cgi::SERVER_PORT [static]
 

Name of cookie.

Definition at line 24 of file cgi.h.

const char* Dv::Ticket::Cgi::LANGUAGE [static]
 

Name of cookie.

Definition at line 26 of file cgi.h.

Dv::Ticket::Ticket::Ref Dv::Ticket::Cgi::ticket_ [private]
 

the ticket, identifying an authenticated user (or, possibly, an anonymous user), associated with this CGI object

Definition at line 57 of file cgi.h.

Referenced by ticket(), and user().

bool Dv::Ticket::Cgi::is_ssl_ [private]
 

true iff this cgi program must be accessed only using SSL connections

Definition at line 59 of file cgi.h.

Referenced by is_ssl().

std::string Dv::Ticket::Cgi::language_ [private]
 

language to communicate with the user

Definition at line 61 of file cgi.h.

Referenced by language().


The documentation for this class was generated from the following file:
dvticket-0.7.6 [22 January, 2006]