lemonldap-ng/doc/pages/documentation/1.9/authfacebook.html
2015-12-18 09:46:34 +00:00

94 lines
4.0 KiB
HTML

<!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" xml:lang="en"
lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<!-- metadata -->
<meta name="generator" content="Offline" />
<meta name="version" content="Offline 0.1" />
<!-- style sheet links -->
<link rel="stylesheet" media="all" type="text/css" href="../../../css/all.css" />
<link rel="stylesheet" media="screen" type="text/css" href="../../../css/screen.css" />
<link rel="stylesheet" media="print" type="text/css" href="../../../css/print.css" />
</head>
<body>
<div class="dokuwiki export">
<h1 class="sectionedit1" id="facebook">Facebook</h1>
<div class="level1">
<div class="table sectionedit2"><table class="inline">
<thead>
<tr class="row0 roweven">
<th class="col0 centeralign"> Authentication </th><th class="col1 centeralign"> Users </th><th class="col2 centeralign"> Password </th>
</tr>
</thead>
<tr class="row1 rowodd">
<td class="col0 centeralign"></td><td class="col1 centeralign"></td><td class="col2"> </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [25-88] -->
</div>
<!-- EDIT1 SECTION "Facebook" [1-89] -->
<h2 class="sectionedit3" id="presentation">Presentation</h2>
<div class="level2">
<p>
<a href="http://facebook.com" class="urlextern" title="http://facebook.com" rel="nofollow">Facebook</a> is a famous social network service. Facebook uses <a href="http://en.wikipedia.org/wiki/OAuth2" class="urlextern" title="http://en.wikipedia.org/wiki/OAuth2" rel="nofollow">OAuth2</a> protocol to allow applications to reuse its own authentication process (it means, if your are connected to Facebook, other applications can trust Facebook and let you in).
</p>
<p>
You need <a href="https://metacpan.org/release/Net-Facebook-Oauth2" class="urlextern" title="https://metacpan.org/release/Net-Facebook-Oauth2" rel="nofollow">Net::Facebook::Oauth2</a> package.
</p>
<p>
You need to register a new application on Facebook to get an application ID and a secret. See <a href="https://developers.facebook.com/apps" class="urlextern" title="https://developers.facebook.com/apps" rel="nofollow">https://developers.facebook.com/apps</a> on how to do that.
</p>
</div>
<!-- EDIT3 SECTION "Presentation" [90-667] -->
<h2 class="sectionedit4" id="configuration">Configuration</h2>
<div class="level2">
<p>
In Manager, go in <code>General Parameters</code> &gt; <code>Authentication modules</code> and choose Facebook for authentication module. You can also use Facebook as user database.
</p>
<p>
Then, go in <code>Facebook parameters</code>:
</p>
<ul>
<li class="level1"><div class="li"> <strong>Authentication level</strong>: authentication level for this module.</div>
</li>
<li class="level1"><div class="li"> <strong>Facebook application ID</strong>: the application ID you get</div>
</li>
<li class="level1"><div class="li"> <strong>Facebook application secret</strong>: the corresponding secret</div>
</li>
</ul>
<p>
If you use Facebook as user database, declare values in exported variables :
</p>
<ul>
<li class="level1"><div class="li"> use any key name you want. If you want to refuse access when a data is missing, just add a “!” before the key name</div>
</li>
<li class="level1"><div class="li"> in the value field, set the field name. You can show them using <a href="https://developers.facebook.com/tools/explorer" class="urlextern" title="https://developers.facebook.com/tools/explorer" rel="nofollow">Facebook Graph API explorer</a></div>
</li>
</ul>
<p>
See also <a href="../../documentation/1.9/exportedvars.html" class="wikilink1" title="documentation:1.9:exportedvars">exported variables configuration</a>.
</p>
<p>
<p><div class="notetip">You can use the same Facebook access token in your applications. It is stored in session datas under the name <strong>$_facebookToken</strong>
</div></p>
</p>
</div>
</div><!-- closes <div class="dokuwiki export">-->