Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 982

wt-doc-3.2.3-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt: Wt::Auth::AuthWidget Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="namespaceWt_1_1Auth.html">Auth</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html">AuthWidget</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::Auth::AuthWidget Class Reference<div class="ingroups"><a class="el" href="group__auth.html">Authentication module (Wt::Auth)</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::Auth::AuthWidget" --><!-- doxytag: inherits="Wt::WTemplateFormView" -->
<p>An authentication widget.  
 <a href="classWt_1_1Auth_1_1AuthWidget.html#details">More...</a></p>

<p><code>#include &lt;Wt/Auth/AuthWidget&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::Auth::AuthWidget:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1Auth_1_1AuthWidget__inherit__graph.png" border="0" usemap="#Wt_1_1Auth_1_1AuthWidget_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1Auth_1_1AuthWidget_inherit__map" id="Wt_1_1Auth_1_1AuthWidget_inherit__map">
<area shape="rect" href="classWt_1_1WTemplateFormView.html" title="A template&#45;based View class form form models." alt="" coords="5,379,173,405"/><area shape="rect" href="classWt_1_1WTemplate.html" title="A widget that renders an XHTML template." alt="" coords="33,304,145,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="17,229,161,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="25,155,153,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="40,80,139,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="41,5,137,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1Auth_1_1AuthWidget-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a415750865cc2bf25fad1f517810f9acb">AuthWidget</a> (const <a class="el" href="classWt_1_1Auth_1_1AuthService.html">AuthService</a> &amp;baseAuth, <a class="el" href="classWt_1_1Auth_1_1AbstractUserDatabase.html">AbstractUserDatabase</a> &amp;users, <a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;login, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a415750865cc2bf25fad1f517810f9acb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ac18531a93a539d979cda6603f03ecaf2">AuthWidget</a> (<a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;login, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#ac18531a93a539d979cda6603f03ecaf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a2629c1f25864f151361b7590eb7e9e1a">setModel</a> (<a class="el" href="classWt_1_1Auth_1_1AuthModel.html">AuthModel</a> *model)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a model.  <a href="#a2629c1f25864f151361b7590eb7e9e1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Auth_1_1AuthModel.html">AuthModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a58b4f598a087cae82b838f19b2114fdd">model</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the model.  <a href="#a58b4f598a087cae82b838f19b2114fdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ada371aafa2d133314decb29f4520b75e">login</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the login object.  <a href="#ada371aafa2d133314decb29f4520b75e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a3d8e977c355660bcc2441ac11b42f97a">setInternalBasePath</a> (const std::string &amp;path)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an internal path for authentication services.  <a href="#a3d8e977c355660bcc2441ac11b42f97a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a732f0f5cc9a57136ca46a8fe887a21f4">internalBasePath</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the internal path.  <a href="#a732f0f5cc9a57136ca46a8fe887a21f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a155794d70cfd4c07c44b0efdd7dec341">setRegistrationEnabled</a> (bool enabled)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures registration capabilities.  <a href="#a155794d70cfd4c07c44b0efdd7dec341"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#af39805f0625f450368250fed8fe7a244">registerNewUser</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a new registration process.  <a href="#af39805f0625f450368250fed8fe7a244"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a49ebff7095fe9e756131073be1188eb8">registerNewUser</a> (const <a class="el" href="classWt_1_1Auth_1_1Identity.html">Identity</a> &amp;oauth)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a new registration process.  <a href="#a49ebff7095fe9e756131073be1188eb8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a7e64d84a1717f437fa9a32d5901ca411">processEnvironment</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes the (initial) environment.  <a href="#a7e64d84a1717f437fa9a32d5901ca411"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aff3fbd75b84abc7b2c9592033012e4e2">letUpdatePassword</a> (const <a class="el" href="classWt_1_1Auth_1_1User.html">User</a> &amp;user, bool promptPassword)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the user update his password.  <a href="#aff3fbd75b84abc7b2c9592033012e4e2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a1d54b23038ef22e09892edaac4bb9856">handleLostPassword</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the user "recover" a lost password.  <a href="#a1d54b23038ef22e09892edaac4bb9856"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a0c218e0c8c5bcd30de8995ac6015ed15">createLostPasswordView</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a lost password view.  <a href="#a0c218e0c8c5bcd30de8995ac6015ed15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a22c3363882bbdd3b399b3a087b925f0b">createRegistrationView</a> (const <a class="el" href="classWt_1_1Auth_1_1Identity.html">Identity</a> &amp;id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a registration view.  <a href="#a22c3363882bbdd3b399b3a087b925f0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a6e43ba8fc23802ce33c3fee685143dc7">createUpdatePasswordView</a> (const <a class="el" href="classWt_1_1Auth_1_1User.html">User</a> &amp;user, bool promptPassword)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a view to update a user's password.  <a href="#a6e43ba8fc23802ce33c3fee685143dc7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WDialog.html">WDialog</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a9d504386871c467effe71b415d48590e">createPasswordPromptDialog</a> (<a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;login)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a password prompt dialog.  <a href="#a9d504386871c467effe71b415d48590e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ae5e9eb9426ee6cd1e6e9c602914ad8d7">create</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the user-interface.  <a href="#ae5e9eb9426ee6cd1e6e9c602914ad8d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ab9aaf604093867440e6ec536e11c452b">createLoginView</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the login view.  <a href="#ab9aaf604093867440e6ec536e11c452b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aed83b29ceec9330b176ae258c8966e3a">createLoggedInView</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the view shown when the user is logged in.  <a href="#aed83b29ceec9330b176ae258c8966e3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aa2bd7bb802e6002001d9d0d39ae82448">createPasswordLoginView</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a password login view.  <a href="#aa2bd7bb802e6002001d9d0d39ae82448"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a8c39d6a467ce4117bc2a6bae73973e21">createOAuthLoginView</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a widget to login using OAuth.  <a href="#a8c39d6a467ce4117bc2a6bae73973e21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WDialog.html">WDialog</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ae482cf4e40cef8b2ada300565e693243">showDialog</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;title, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *contents)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shows a dialog.  <a href="#ae482cf4e40cef8b2ada300565e693243"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html">RegistrationModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a41170e9b220b37e257336783fb971f08">createRegistrationModel</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a registration model.  <a href="#a41170e9b220b37e257336783fb971f08"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a6ff8949bfa82025e0e5e2b093fb839fc">createFormWidget</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">AuthModel::Field</a> field)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a form widget.  <a href="#a6ff8949bfa82025e0e5e2b093fb839fc"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An authentication widget. </p>
<p>The authentication widget is a widget that provides a login or logout function (depending on whether the user is currently logged in). You can use it for either or both purposes.</p>
<p><a class="el" href="classWt_1_1Auth_1_1Login.html" title="A class that manages the current login state.">Login</a> or logout events are signalled to a <a class="el" href="classWt_1_1Auth_1_1Login.html" title="A class that manages the current login state.">Login</a> object on which this widget acts.</p>
<p>The widget also processes environmental information related to authentication:</p>
<ul>
<li>email tokens, which are indicated in an internal path. The widget uses dialogs (by default) to interact with the user to act on the token.</li>
<li>authentication tokens, which are stored in browser cookies, to implement remember-me functionality.</li>
</ul>
<p>The <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a7e64d84a1717f437fa9a32d5901ca411" title="Processes the (initial) environment.">processEnvironment()</a> method initiates this process, and should typically be called only at application startup time.</p>
<p>The authentication widget is implemented as a View for an <a class="el" href="classWt_1_1Auth_1_1AuthModel.html" title="Model for implementing an authentication view.">AuthModel</a>, which can be set using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a2629c1f25864f151361b7590eb7e9e1a" title="Sets a model.">setModel()</a>. The login logic (at this moment only for password-based authentication) is handled by this model.</p>
<p>It is very likely that the off-the shelf authentication widget does not satisfy entirely to your taste or functional requirements. The widget uses three methods to allow customization:</p>
<ul>
<li>as a <a class="el" href="classWt_1_1WTemplateFormView.html" title="A template-based View class form form models.">WTemplateFormView</a>, you may change the layout and styling of to your liking.</li>
<li>the authentication logic is delegated to an <a class="el" href="classWt_1_1Auth_1_1AuthModel.html" title="Model for implementing an authentication view.">AuthModel</a> and can can be specialized or can be used with a custom view altogether.</li>
<li>the views are created using virtual methods, which may be specialized to create a customized view or to apply changes to the default view. </li>
</ul>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a415750865cc2bf25fad1f517810f9acb"></a><!-- doxytag: member="Wt::Auth::AuthWidget::AuthWidget" ref="a415750865cc2bf25fad1f517810f9acb" args="(const AuthService &amp;baseAuth, AbstractUserDatabase &amp;users, Login &amp;login, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::Auth::AuthWidget::AuthWidget </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Auth_1_1AuthService.html">AuthService</a> &amp;&#160;</td>
          <td class="paramname"><em>baseAuth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1AbstractUserDatabase.html">AbstractUserDatabase</a> &amp;&#160;</td>
          <td class="paramname"><em>users</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;&#160;</td>
          <td class="paramname"><em>login</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Creates a new authentication widget. This creates an <a class="el" href="classWt_1_1Auth_1_1AuthModel.html" title="Model for implementing an authentication view.">AuthModel</a> using the given authentication service <code>baseAuth</code> and user database <code>users</code>.</p>
<p>The result of authentication changes is propagated to the rest of the application using a <code>login</code> object.</p>
<p>Authentication services need to be configured in the <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a58b4f598a087cae82b838f19b2114fdd" title="Returns the model.">model()</a>. </p>

</div>
</div>
<a class="anchor" id="ac18531a93a539d979cda6603f03ecaf2"></a><!-- doxytag: member="Wt::Auth::AuthWidget::AuthWidget" ref="ac18531a93a539d979cda6603f03ecaf2" args="(Login &amp;login, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::Auth::AuthWidget::AuthWidget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;&#160;</td>
          <td class="paramname"><em>login</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Creates a new authentication widget.</p>
<p>The result of authentication changes is propagated to the rest of the application using a <code>login</code> object.</p>
<p>You need to call <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a2629c1f25864f151361b7590eb7e9e1a" title="Sets a model.">setModel()</a> to configure a model for this view. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae5e9eb9426ee6cd1e6e9c602914ad8d7"></a><!-- doxytag: member="Wt::Auth::AuthWidget::create" ref="ae5e9eb9426ee6cd1e6e9c602914ad8d7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates the user-interface. </p>
<p>This method is called just before an initial rendering, and creates the initial view.</p>
<p>The default implementation calls <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ab9aaf604093867440e6ec536e11c452b" title="Creates the login view.">createLoginView()</a> or <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aed83b29ceec9330b176ae258c8966e3a" title="Creates the view shown when the user is logged in.">createLoggedInView()</a> depending on whether a user is currently logged in. </p>

</div>
</div>
<a class="anchor" id="a6ff8949bfa82025e0e5e2b093fb839fc"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createFormWidget" ref="a6ff8949bfa82025e0e5e2b093fb839fc" args="(AuthModel::Field field)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> * Wt::Auth::AuthWidget::createFormWidget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">AuthModel::Field</a>&#160;</td>
          <td class="paramname"><em>field</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a form widget. </p>
<p>This method is called by <a class="el" href="classWt_1_1WTemplateFormView.html#abc0709f1ef21e4ed4c182a103d1a1885" title="Creates or updates a field in the View.">updateViewField()</a> when it needs to create a form widget for a field. You either need to make sure these widgets have been created and bound before calling <a class="el" href="classWt_1_1WTemplateFormView.html#a07d05005f74f317938b7f8546f1d377a" title="Updates the View.">updateView()</a>, or you need to specialize this method to do it on-demand. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WTemplateFormView.html#a561f9d5afe770bf3296ab41177edb652">Wt::WTemplateFormView</a>.</p>

</div>
</div>
<a class="anchor" id="aed83b29ceec9330b176ae258c8966e3a"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createLoggedInView" ref="aed83b29ceec9330b176ae258c8966e3a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::createLoggedInView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates the view shown when the user is logged in. </p>
<p>The default implementation renders the <code>"Wt.Auth.template.logged-in"</code> template. </p>

</div>
</div>
<a class="anchor" id="ab9aaf604093867440e6ec536e11c452b"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createLoginView" ref="ab9aaf604093867440e6ec536e11c452b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::createLoginView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates the login view. </p>
<p>This creates a view that allows the user to login, and is shown when no user is current logged in.</p>
<p>The default implementation renders the <code>"Wt.Auth.template.login"</code> template, and binds fields using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aa2bd7bb802e6002001d9d0d39ae82448" title="Creates a password login view.">createPasswordLoginView()</a> and <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a8c39d6a467ce4117bc2a6bae73973e21" title="Creates a widget to login using OAuth.">createOAuthLoginView()</a>. </p>

</div>
</div>
<a class="anchor" id="a0c218e0c8c5bcd30de8995ac6015ed15"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createLostPasswordView" ref="a0c218e0c8c5bcd30de8995ac6015ed15" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::Auth::AuthWidget::createLostPasswordView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a lost password view. </p>
<p>When email verification has been enabled, the user may indicate that he has lost his password -- then proof of controlling the same email address that had associated with his account is sufficient to allow him to enter a new password.</p>
<p>This creates the widget used to let the user enter his email address. The default implementation creates a new <a class="el" href="classWt_1_1Auth_1_1LostPasswordWidget.html" title="A widget which initiates a lost-password email.">LostPasswordWidget</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a1d54b23038ef22e09892edaac4bb9856" title="Lets the user &quot;recover&quot; a lost password.">handleLostPassword()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8c39d6a467ce4117bc2a6bae73973e21"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createOAuthLoginView" ref="a8c39d6a467ce4117bc2a6bae73973e21" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::createOAuthLoginView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a widget to login using OAuth. </p>
<p>The default implementation adds an icon for each OAuth service provider available.</p>
<p>There's alot to say about making a usable login mechanism for OAuth (and federated login services in general), see <a href="https://sites.google.com/site/oauthgoog/UXFedLogin.">https://sites.google.com/site/oauthgoog/UXFedLogin.</a></p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ab9aaf604093867440e6ec536e11c452b" title="Creates the login view.">createLoginView()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa2bd7bb802e6002001d9d0d39ae82448"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createPasswordLoginView" ref="aa2bd7bb802e6002001d9d0d39ae82448" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::createPasswordLoginView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a password login view. </p>
<p>This is used by the default implementation of <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ab9aaf604093867440e6ec536e11c452b" title="Creates the login view.">createLoginView()</a> to prompt for the information needed for logging in using a username and password. The default implementation implements a view guided by the <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a58b4f598a087cae82b838f19b2114fdd" title="Returns the model.">model()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ab9aaf604093867440e6ec536e11c452b" title="Creates the login view.">createLoginView()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9d504386871c467effe71b415d48590e"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createPasswordPromptDialog" ref="a9d504386871c467effe71b415d48590e" args="(Login &amp;login)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WDialog.html">WDialog</a> * Wt::Auth::AuthWidget::createPasswordPromptDialog </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a> &amp;&#160;</td>
          <td class="paramname"><em>login</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a password prompt dialog. </p>
<p>This creates a dialog which prompts the user for his password. The user is taken from the <code>login</code> object, which also signals an eventual success using its <a class="el" href="classWt_1_1Auth_1_1Login.html#aafb1d791aeee8b59d28faeda88e8392b" title="Signal that indicates login changes.">Login::changed()</a> signal.</p>
<p>The default implementation instantiates a <a class="el" href="classWt_1_1Auth_1_1PasswordPromptDialog.html" title="A dialog that prompts for the user password.">PasswordPromptDialog</a>. </p>

</div>
</div>
<a class="anchor" id="a41170e9b220b37e257336783fb971f08"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createRegistrationModel" ref="a41170e9b220b37e257336783fb971f08" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html">RegistrationModel</a> * Wt::Auth::AuthWidget::createRegistrationModel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a registration model. </p>
<p>This method creates a registration model.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#af39805f0625f450368250fed8fe7a244" title="Starts a new registration process.">registerNewUser()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a22c3363882bbdd3b399b3a087b925f0b"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createRegistrationView" ref="a22c3363882bbdd3b399b3a087b925f0b" args="(const Identity &amp;id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::Auth::AuthWidget::createRegistrationView </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Auth_1_1Identity.html">Identity</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a registration view. </p>
<p>This creates a registration view, optionally using information already obtained from a third party identification service (such as an OAuth provider).</p>
<p>The default implementation creates a new <a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html" title="A registration widget.">RegistrationWidget</a> with a model created using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a41170e9b220b37e257336783fb971f08" title="Creates a registration model.">createRegistrationModel()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#af39805f0625f450368250fed8fe7a244" title="Starts a new registration process.">registerNewUser()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6e43ba8fc23802ce33c3fee685143dc7"></a><!-- doxytag: member="Wt::Auth::AuthWidget::createUpdatePasswordView" ref="a6e43ba8fc23802ce33c3fee685143dc7" args="(const User &amp;user, bool promptPassword)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::Auth::AuthWidget::createUpdatePasswordView </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Auth_1_1User.html">User</a> &amp;&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>promptPassword</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a view to update a user's password. </p>
<p>If <code>promptPassword</code> is <code>true</code>, the user has to enter his current password in addition to a new password.</p>
<p>This creates the widget used to let the user chose a new password. The default implementation instantiates an <a class="el" href="classWt_1_1Auth_1_1UpdatePasswordWidget.html" title="A widget which allows a user to choose a new password.">UpdatePasswordWidget</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aff3fbd75b84abc7b2c9592033012e4e2" title="Lets the user update his password.">letUpdatePassword()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1d54b23038ef22e09892edaac4bb9856"></a><!-- doxytag: member="Wt::Auth::AuthWidget::handleLostPassword" ref="a1d54b23038ef22e09892edaac4bb9856" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::handleLostPassword </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the user "recover" a lost password. </p>
<p>This creates a view to let the user enter his email address, used to send an email containing instructions to enter a new password.</p>
<p>The default implementation creates a new view using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a0c218e0c8c5bcd30de8995ac6015ed15" title="Creates a lost password view.">createLostPasswordView()</a> and shows it in a dialog using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ae482cf4e40cef8b2ada300565e693243" title="Shows a dialog.">showDialog()</a>. </p>

</div>
</div>
<a class="anchor" id="a732f0f5cc9a57136ca46a8fe887a21f4"></a><!-- doxytag: member="Wt::Auth::AuthWidget::internalBasePath" ref="a732f0f5cc9a57136ca46a8fe887a21f4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Wt::Auth::AuthWidget::internalBasePath </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the internal path. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a3d8e977c355660bcc2441ac11b42f97a" title="Sets an internal path for authentication services.">setInternalBasePath()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aff3fbd75b84abc7b2c9592033012e4e2"></a><!-- doxytag: member="Wt::Auth::AuthWidget::letUpdatePassword" ref="aff3fbd75b84abc7b2c9592033012e4e2" args="(const User &amp;user, bool promptPassword)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::letUpdatePassword </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Auth_1_1User.html">User</a> &amp;&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>promptPassword</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the user update his password. </p>
<p>This creates a view to let the user enter his new password.</p>
<p>The default implementation creates a new view using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a6e43ba8fc23802ce33c3fee685143dc7" title="Creates a view to update a user&#39;s password.">createUpdatePasswordView()</a> and shows it in a dialog using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ae482cf4e40cef8b2ada300565e693243" title="Shows a dialog.">showDialog()</a>. </p>

</div>
</div>
<a class="anchor" id="ada371aafa2d133314decb29f4520b75e"></a><!-- doxytag: member="Wt::Auth::AuthWidget::login" ref="ada371aafa2d133314decb29f4520b75e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Auth_1_1Login.html">Login</a>&amp; Wt::Auth::AuthWidget::login </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the login object. </p>
<p>This login object is used to keep track of the user currently authenticated. </p>

</div>
</div>
<a class="anchor" id="a58b4f598a087cae82b838f19b2114fdd"></a><!-- doxytag: member="Wt::Auth::AuthWidget::model" ref="a58b4f598a087cae82b838f19b2114fdd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Auth_1_1AuthModel.html">AuthModel</a>* Wt::Auth::AuthWidget::model </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the model. </p>
<p>The model is used only for the login function.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a2629c1f25864f151361b7590eb7e9e1a" title="Sets a model.">setModel()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7e64d84a1717f437fa9a32d5901ca411"></a><!-- doxytag: member="Wt::Auth::AuthWidget::processEnvironment" ref="a7e64d84a1717f437fa9a32d5901ca411" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::processEnvironment </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Processes the (initial) environment. </p>
<p>This method process environmental information that may be relevant to authentication:</p>
<ul>
<li>email tokens, which are indicated through an internal path. The widget uses dialogs (by default) to interact with the user to act on the token.</li>
</ul>
<ul>
<li>authentication tokens, which are stored in browser cookies, to implement remember-me functionality. When logging in using an authentication token, the login is considered "weak" (since a user may have inadvertently forgotten to logout from a public computer). You should let the user authenticate using another, primary method before doing sensitive operations. The <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a9d504386871c467effe71b415d48590e" title="Creates a password prompt dialog.">createPasswordPromptDialog()</a> method may be useful for this.</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#aff3fbd75b84abc7b2c9592033012e4e2" title="Lets the user update his password.">letUpdatePassword()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af39805f0625f450368250fed8fe7a244"></a><!-- doxytag: member="Wt::Auth::AuthWidget::registerNewUser" ref="af39805f0625f450368250fed8fe7a244" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::registerNewUser </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Starts a new registration process. </p>
<p>This calls <code>registerNewUser(0)</code>. </p>

</div>
</div>
<a class="anchor" id="a49ebff7095fe9e756131073be1188eb8"></a><!-- doxytag: member="Wt::Auth::AuthWidget::registerNewUser" ref="a49ebff7095fe9e756131073be1188eb8" args="(const Identity &amp;oauth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::registerNewUser </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Auth_1_1Identity.html">Identity</a> &amp;&#160;</td>
          <td class="paramname"><em>oauth</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Starts a new registration process. </p>
<p>This starts a new registration process, and may be called in response to a user action, an internal path change, or an <a class="el" href="classWt_1_1Auth_1_1OAuthService.html" title="An OAuth authorization (and authentication) service provider.">OAuthService</a> login procedure which identified a new user. In the latter case, the OAuth-provided information is passed as parameter <code>oauth</code>.</p>
<p>The default implementation creates a view using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a22c3363882bbdd3b399b3a087b925f0b" title="Creates a registration view.">createRegistrationView()</a>, and shows it in a dialog using <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#ae482cf4e40cef8b2ada300565e693243" title="Shows a dialog.">showDialog()</a>. </p>

</div>
</div>
<a class="anchor" id="a3d8e977c355660bcc2441ac11b42f97a"></a><!-- doxytag: member="Wt::Auth::AuthWidget::setInternalBasePath" ref="a3d8e977c355660bcc2441ac11b42f97a" args="(const std::string &amp;path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::setInternalBasePath </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets an internal path for authentication services. </p>
<p>Only the registration function is made available through an internal path (so that one can redirect a user to the registration page). Other internal paths involved in authentication are configured in the service classes:</p>
<ul>
<li><a class="el" href="classWt_1_1Auth_1_1AuthService.html#ac1ce625114817d88f32b041473e5cfcf" title="Sets the internal path used to present tokens in emails.">AuthService::setEmailRedirectInternalPath()</a>: email tokens</li>
<li>OAuthService::redirectInternalPath(): an internal path used during the oauth process. </li>
</ul>

</div>
</div>
<a class="anchor" id="a2629c1f25864f151361b7590eb7e9e1a"></a><!-- doxytag: member="Wt::Auth::AuthWidget::setModel" ref="a2629c1f25864f151361b7590eb7e9e1a" args="(AuthModel *model)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::setModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1AuthModel.html">AuthModel</a> *&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a model. </p>
<p>This sets a model to be used for authentication. </p>

</div>
</div>
<a class="anchor" id="a155794d70cfd4c07c44b0efdd7dec341"></a><!-- doxytag: member="Wt::Auth::AuthWidget::setRegistrationEnabled" ref="a155794d70cfd4c07c44b0efdd7dec341" args="(bool enabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Auth::AuthWidget::setRegistrationEnabled </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configures registration capabilities. </p>
<p>Although the <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html" title="An authentication widget.">AuthWidget</a> itself does not implement a registration view, it may offer a button/link to do so, and calls <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#af39805f0625f450368250fed8fe7a244" title="Starts a new registration process.">registerNewUser()</a> when a user wishes to register.</p>
<p>Even if registration is not enabled, the result of an <a class="el" href="classWt_1_1Auth_1_1OAuthService.html" title="An OAuth authorization (and authentication) service provider.">OAuthService</a> login process may be that a new user is identified. Then the <a class="el" href="classWt_1_1Auth_1_1AuthWidget.html#a22c3363882bbdd3b399b3a087b925f0b" title="Creates a registration view.">createRegistrationView()</a> is also used to present this new user with a registration view, passing the information obtained through OAuth. </p>

</div>
</div>
<a class="anchor" id="ae482cf4e40cef8b2ada300565e693243"></a><!-- doxytag: member="Wt::Auth::AuthWidget::showDialog" ref="ae482cf4e40cef8b2ada300565e693243" args="(const WString &amp;title, WWidget *contents)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WDialog.html">WDialog</a> * Wt::Auth::AuthWidget::showDialog </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td>
          <td class="paramname"><em>contents</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shows a dialog. </p>
<p>This shows a dialog. The default method creates a standard <a class="el" href="classWt_1_1WDialog.html" title="A WDialog shows a dialog.">WDialog</a>, with the given <code>title</code> and <code>contents</code> as central widget.</p>
<p>When the central widget is deleted, it deletes the dialog. </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>