Sophie

Sophie

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

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::OAuthService 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_1OAuthService.html">OAuthService</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::Auth::OAuthService 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::OAuthService" -->
<p>An OAuth authorization (and authentication) service provider.  
 <a href="classWt_1_1Auth_1_1OAuthService.html#details">More...</a></p>

<p><code>#include &lt;Wt/Auth/OAuthService&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::Auth::OAuthService:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1Auth_1_1OAuthService__inherit__graph.png" border="0" usemap="#Wt_1_1Auth_1_1OAuthService_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1Auth_1_1OAuthService_inherit__map" id="Wt_1_1Auth_1_1OAuthService_inherit__map">
<area shape="rect" href="classWt_1_1Auth_1_1FacebookService.html" title="OAuth service for Facebook as third&#45;party authenticator." alt="" coords="5,80,184,107"/><area shape="rect" href="classWt_1_1Auth_1_1GoogleService.html" title="OAuth service for Google as third&#45;party authenticator." alt="" coords="208,80,371,107"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1Auth_1_1OAuthService-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_1OAuthService.html#acfe5b14051c69894c8e49e6a8a68b271">OAuthService</a> (const <a class="el" href="classWt_1_1Auth_1_1AuthService.html">AuthService</a> &amp;baseAuth)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#acfe5b14051c69894c8e49e6a8a68b271"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7bd497ad95bafcee292937099f453022"></a><!-- doxytag: member="Wt::Auth::OAuthService::~OAuthService" ref="a7bd497ad95bafcee292937099f453022" args="()" -->
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a7bd497ad95bafcee292937099f453022">~OAuthService</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d0793a69eedb50bf15ed0c0e4c21d80"></a><!-- doxytag: member="Wt::Auth::OAuthService::baseAuth" ref="a9d0793a69eedb50bf15ed0c0e4c21d80" args="() const " -->
const <a class="el" href="classWt_1_1Auth_1_1AuthService.html">AuthService</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a9d0793a69eedb50bf15ed0c0e4c21d80">baseAuth</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the basic authentication service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html">OAuthProcess</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a24c71776988c7562c507714acb295e06">createProcess</a> (const std::string &amp;scope) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new authorizaiton process.  <a href="#a24c71776988c7562c507714acb295e06"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a5718ddabc7de591b5f056daf1f17701e">name</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the provider name.  <a href="#a5718ddabc7de591b5f056daf1f17701e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WString.html">WString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a17346a2921fe706bc83018fb2443f236">description</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the provider description.  <a href="#a17346a2921fe706bc83018fb2443f236"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#ae7caef7e593e4e078a50e5f872f14d20">popupWidth</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the desired width for the popup window.  <a href="#ae7caef7e593e4e078a50e5f872f14d20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a3f5f2ca918803753061105c0a5836a1e">popupHeight</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the desired height for the popup window.  <a href="#a3f5f2ca918803753061105c0a5836a1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a040351f2a2b956c059ea9974e6829d13">authenticationScope</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the scope needed for authentication.  <a href="#a040351f2a2b956c059ea9974e6829d13"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#add76eee14370693fa109c2768ca70725">redirectEndpoint</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the redirection endpoint URL.  <a href="#add76eee14370693fa109c2768ca70725"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a121b3458ab4b571f3a84a83eaed75893">redirectEndpointPath</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the deployment path of the redirection endpoint.  <a href="#a121b3458ab4b571f3a84a83eaed75893"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#acab141d7eb5a987baf8ea9281bf00a9a">authorizationEndpoint</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the authorization endpoint URL.  <a href="#acab141d7eb5a987baf8ea9281bf00a9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#ad649c21d85628e58eeba7171f1bb9990">tokenEndpoint</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the token endpoint URL.  <a href="#ad649c21d85628e58eeba7171f1bb9990"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a3f5d653cb613109848321463663ba636">clientId</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the client ID.  <a href="#a3f5d653cb613109848321463663ba636"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a10f60c79a0892266e75fef4b0965c1f8">clientSecret</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the client secret.  <a href="#a10f60c79a0892266e75fef4b0965c1f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a20ce929ed243685956cc49ef97b5e7ab">encodeState</a> (const std::string &amp;sessionId) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Derives a state value from the session ID.  <a href="#a20ce929ed243685956cc49ef97b5e7ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a0d80557eb78ceddfbb5f7a3be450de2e">decodeState</a> (const std::string &amp;state) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Validates and decodes a state parameter.  <a href="#a0d80557eb78ceddfbb5f7a3be450de2e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceWt_1_1Http.html#a4a1e30eb403b05b4e5afc5c6286dd6b9">Http::Method</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a8652d34d8205f06555b38b7239190c86">tokenRequestMethod</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the HTTP method used for the token request.  <a href="#a8652d34d8205f06555b38b7239190c86"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An OAuth authorization (and authentication) service provider. </p>
<p>This class implements an OAuth client (<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-22">2.0 draft</a>), which can be used to allow the user to authorize access to information provided by a third-party OAuth service provider. This allows, among other things, for a user to safely authenticate with your web application without needing to store or even handle his authorization credentials (such as a password), a pattern called "OAuth2 connect".</p>
<p>The OAuth protocol provides a standard for a user to authorize access to protected resources made available by a third party service. The process starts with the user authenticating on an "authorization page" and authorizing access. This results eventually in an access token for the web application. The actual use of this token, to obtain certain information (such as an authenticated identity) from the third party is however not standardized, and there are many other uses of OAuth besides authentication.</p>
<p>Because the focus of the Wt::Auth library is authentication, the OAuth class also contains the implementation for using the access token for authentication (<a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html#aa8102afbc7fa52027e15f4a952288923" title="Obtains an authenticated identity.">OAuthProcess::getIdentity()</a>).</p>
<p>Like all <b>service classes</b>, this class holds only configuration state. Thus, once configured, it can be safely shared between multiple sessions since its state (the configuration) is read-only. A "const OAuthService" object is thus thread-safe.</p>
<p>The OAuth authorization protocol, including the subsequent use for authentication, consists of a number of consecutive steps, some of which require user interaction, and some which require the use of remote web services. The state machine for this process is implemented in an <a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html" title="An OAuth authorization (and authentication) process.">OAuthProcess</a>. To use OAuth, you need to create such a process and listen for state changes.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <a class="code" href="classWt_1_1Auth_1_1OAuthService.html#acfe5b14051c69894c8e49e6a8a68b271" title="Constructor.">OAuthService</a> *oauth = ...;

 <span class="comment">// Creates an icon which prompts for authentication using this OAuth service.</span>
 WImage *icon = <span class="keyword">new</span> WImage(<span class="stringliteral">&quot;css/oauth-&quot;</span> + auth-&gt;name() + <span class="stringliteral">&quot;.png&quot;</span>, icons);
 icon-&gt;setToolTip(auth-&gt;description());

 <span class="comment">// Creates a new process for authentication, which is started by a click on the icon</span>
 process = oauth-&gt;createProcess(oauth-&gt;authenticationScope());
 icon-&gt;clicked().connect(process_, &amp;<a class="code" href="classWt_1_1Auth_1_1OAuthProcess.html#a3f6e1c6cf8015d5515d61875cc81fd6c" title="Starts an authorization and authentication process.">OAuthProcess::startAuthenticate</a>);

 <span class="comment">// And capture the result in a method.</span>
 process_-&gt;authenticated().connect(<span class="keyword">this</span>, &amp;MyWidget::oauthDone);
</pre></div> </div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acfe5b14051c69894c8e49e6a8a68b271"></a><!-- doxytag: member="Wt::Auth::OAuthService::OAuthService" ref="acfe5b14051c69894c8e49e6a8a68b271" args="(const AuthService &amp;baseAuth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::Auth::OAuthService::OAuthService </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Creates a new OAuth service. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a040351f2a2b956c059ea9974e6829d13"></a><!-- doxytag: member="Wt::Auth::OAuthService::authenticationScope" ref="a040351f2a2b956c059ea9974e6829d13" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::authenticationScope </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the scope needed for authentication. </p>
<p>This returns the scope that is needed (and sufficient) for obtaining identity information, and thus to authenticate the user.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html#aa8102afbc7fa52027e15f4a952288923" title="Obtains an authenticated identity.">OAuthProcess::getIdentity()</a>, <a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html#a3f6e1c6cf8015d5515d61875cc81fd6c" title="Starts an authorization and authentication process.">OAuthProcess::startAuthenticate()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#aefcddd1d08425ad478714cde01020acf">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a304a2911844768a488f3ca5ad1020a22">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="acab141d7eb5a987baf8ea9281bf00a9a"></a><!-- doxytag: member="Wt::Auth::OAuthService::authorizationEndpoint" ref="acab141d7eb5a987baf8ea9281bf00a9a" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::authorizationEndpoint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the authorization endpoint URL. </p>
<p>This is a remote URL which hosts the OAuth authorization user interface. This URL is loaded in the popup window at the start of an authorization process. </p>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a373f178a3f1f65709b627b48de33bf95">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a522d6a5b51caa227218329602a428e4f">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a3f5d653cb613109848321463663ba636"></a><!-- doxytag: member="Wt::Auth::OAuthService::clientId" ref="a3f5d653cb613109848321463663ba636" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::clientId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the client ID. </p>
<p>This is the identification for this web application with the OAuth authorization server. </p>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a860a448ad2dde35788de6997932d81fa">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#ab06a4b518d49c4f671e9c1697efcc5d4">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a10f60c79a0892266e75fef4b0965c1f8"></a><!-- doxytag: member="Wt::Auth::OAuthService::clientSecret" ref="a10f60c79a0892266e75fef4b0965c1f8" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::clientSecret </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the client secret. </p>
<p>This is the secret credentials for this web application with the OAuth authorization server. </p>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a7fea0476d032ae1a95006563ab1d8b17">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#aef8cd4f74a5a993fdaad63d8999c752b">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a24c71776988c7562c507714acb295e06"></a><!-- doxytag: member="Wt::Auth::OAuthService::createProcess" ref="a24c71776988c7562c507714acb295e06" args="(const std::string &amp;scope) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classWt_1_1Auth_1_1OAuthProcess.html">OAuthProcess</a>* Wt::Auth::OAuthService::createProcess </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>scope</em></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new authorizaiton process. </p>
<p>This creates a new authorization process for the indicated scope. Valid names for the scope are service provider dependent.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a040351f2a2b956c059ea9974e6829d13" title="Returns the scope needed for authentication.">authenticationScope()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a65db4b2bc93059ddda24f70cb81bc8ed">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#af11fc6b9db5ae2327c9e5ebb58a124eb">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a0d80557eb78ceddfbb5f7a3be450de2e"></a><!-- doxytag: member="Wt::Auth::OAuthService::decodeState" ref="a0d80557eb78ceddfbb5f7a3be450de2e" args="(const std::string &amp;state) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Wt::Auth::OAuthService::decodeState </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Validates and decodes a state parameter. </p>
<p>This function returns the sessionId that is encoded in the state, if the signature validates that it is an authentic state generated by <a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a20ce929ed243685956cc49ef97b5e7ab" title="Derives a state value from the session ID.">encodeState()</a>. </p>

</div>
</div>
<a class="anchor" id="a17346a2921fe706bc83018fb2443f236"></a><!-- doxytag: member="Wt::Auth::OAuthService::description" ref="a17346a2921fe706bc83018fb2443f236" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classWt_1_1WString.html">WString</a> Wt::Auth::OAuthService::description </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the provider description. </p>
<p>This returns a description useful for e.g. tool tips on a login icon.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a5718ddabc7de591b5f056daf1f17701e" title="Returns the provider name.">name()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#af300a82480ce87b33e1b4467f95822b8">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#adf4ad05a84202f906172f1a9f53efd1e">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a20ce929ed243685956cc49ef97b5e7ab"></a><!-- doxytag: member="Wt::Auth::OAuthService::encodeState" ref="a20ce929ed243685956cc49ef97b5e7ab" args="(const std::string &amp;sessionId) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Wt::Auth::OAuthService::encodeState </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>sessionId</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Derives a state value from the session ID. </p>
<p>The state value protects the authorization protocol against misuse, and is used to connect an authorization code response with a particular request.</p>
<p>In the default implementation the state is the <code>sessionId</code>, crytpographically signed. This signature is verified in <a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a0d80557eb78ceddfbb5f7a3be450de2e" title="Validates and decodes a state parameter.">decodeState()</a>. </p>

</div>
</div>
<a class="anchor" id="a5718ddabc7de591b5f056daf1f17701e"></a><!-- doxytag: member="Wt::Auth::OAuthService::name" ref="a5718ddabc7de591b5f056daf1f17701e" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the provider name. </p>
<p>This is a short identifier.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a17346a2921fe706bc83018fb2443f236" title="Returns the provider description.">description()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a941002f185c84ed367b55d1f706c1bd4">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a4b659bbb0df32ecdaf5f7581e1b85d5f">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a3f5f2ca918803753061105c0a5836a1e"></a><!-- doxytag: member="Wt::Auth::OAuthService::popupHeight" ref="a3f5f2ca918803753061105c0a5836a1e" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Wt::Auth::OAuthService::popupHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the desired height for the popup window. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#ae7caef7e593e4e078a50e5f872f14d20" title="Returns the desired width for the popup window.">popupWidth()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a81f960e5244bf8f573b11c8ea08cbbbf">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a5df93cee3d80ac3cf55155c15fd1b67e">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="ae7caef7e593e4e078a50e5f872f14d20"></a><!-- doxytag: member="Wt::Auth::OAuthService::popupWidth" ref="ae7caef7e593e4e078a50e5f872f14d20" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Wt::Auth::OAuthService::popupWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the desired width for the popup window. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Auth_1_1OAuthService.html#a3f5f2ca918803753061105c0a5836a1e" title="Returns the desired height for the popup window.">popupHeight()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a2240d77cef1d5292e8b0b3d33d195ef6">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a9ff42ee1223e718581fd4ccb2ded8206">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="add76eee14370693fa109c2768ca70725"></a><!-- doxytag: member="Wt::Auth::OAuthService::redirectEndpoint" ref="add76eee14370693fa109c2768ca70725" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::redirectEndpoint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the redirection endpoint URL. </p>
<p>This is the local URL to which the browser is redirect from the service provider, after the authorization process. You need to configure this URL with the third party authentication service.</p>
<p>A static resource will be deployed at this URL.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WServer.html#a7b78b5e35d2dc3086faa54f82124cf38" title="Binds a resource to a fixed path.">WServer::addResource()</a> </dd></dl>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a30dfc53e4c9e4c90951092c7dd061b3e">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#aa205cef2ee79d6ac54a5f4070a404b6e">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a121b3458ab4b571f3a84a83eaed75893"></a><!-- doxytag: member="Wt::Auth::OAuthService::redirectEndpointPath" ref="a121b3458ab4b571f3a84a83eaed75893" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Wt::Auth::OAuthService::redirectEndpointPath </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the deployment path of the redirection endpoint. </p>
<p>This returns the path at which the static resource is deployed that corresponds to the <a class="el" href="classWt_1_1Auth_1_1OAuthService.html#add76eee14370693fa109c2768ca70725" title="Returns the redirection endpoint URL.">redirectEndpoint()</a>.</p>
<p>The default implementation will derive this path from the <a class="el" href="classWt_1_1Auth_1_1OAuthService.html#add76eee14370693fa109c2768ca70725" title="Returns the redirection endpoint URL.">redirectEndpoint()</a> URL. </p>

<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a206920d37ca7b021cd2106be9ff2d38f">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#ad7d342f077036a335d7d077665842868">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="ad649c21d85628e58eeba7171f1bb9990"></a><!-- doxytag: member="Wt::Auth::OAuthService::tokenEndpoint" ref="ad649c21d85628e58eeba7171f1bb9990" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Wt::Auth::OAuthService::tokenEndpoint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the token endpoint URL. </p>
<p>This is a remote URL which hosts a web-service that generates access tokens. </p>

<p>Implemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a0ccf9a6f297701207e4c502df9d566f8">Wt::Auth::FacebookService</a>, and <a class="el" href="classWt_1_1Auth_1_1GoogleService.html#a7f9846c52dbc1716b7f3c708a0068447">Wt::Auth::GoogleService</a>.</p>

</div>
</div>
<a class="anchor" id="a8652d34d8205f06555b38b7239190c86"></a><!-- doxytag: member="Wt::Auth::OAuthService::tokenRequestMethod" ref="a8652d34d8205f06555b38b7239190c86" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceWt_1_1Http.html#a4a1e30eb403b05b4e5afc5c6286dd6b9">Http::Method</a> Wt::Auth::OAuthService::tokenRequestMethod </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the HTTP method used for the token request. </p>
<p>While the current OAuth 2.0 draft mandates the use of POST, some implementations (like Facebook) use URL-encoding and a GET request.</p>
<p>The default implementation returns <a class="el" href="namespaceWt_1_1Http.html#a4a1e30eb403b05b4e5afc5c6286dd6b9a5f101c89662a07a0bcff5c1b78992c77" title="a HTTP POST">Http::Post</a> (corresponding to the current draft). </p>

<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1FacebookService.html#a2cee9d6dadad34c3f0d7415d8520872d">Wt::Auth::FacebookService</a>.</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>