The real release 0.46 :-)
[awl.git] / docs / api / awl / AuthPlugin / _AuthPlugins.php.html
blobf46da4ef57084dca7557ed9ceb0991a12a4e4999
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <!-- template designed by Marco Von Ballmoos -->
6 <title>Docs for page AuthPlugins.php</title>
7 <link rel="stylesheet" href="../../media/stylesheet.css" />
8 <script src="../../media/lib/classTree.js"></script>
9 <script language="javascript" type="text/javascript">
10 var imgPlus = new Image();
11 var imgMinus = new Image();
12 imgPlus.src = "../../media/images/plus.png";
13 imgMinus.src = "../../media/images/minus.png";
15 function showNode(Node){
16 switch(navigator.family){
17 case 'nn4':
18 // Nav 4.x code fork...
19 var oTable = document.layers["span" + Node];
20 var oImg = document.layers["img" + Node];
21 break;
22 case 'ie4':
23 // IE 4/5 code fork...
24 var oTable = document.all["span" + Node];
25 var oImg = document.all["img" + Node];
26 break;
27 case 'gecko':
28 // Standards Compliant code fork...
29 var oTable = document.getElementById("span" + Node);
30 var oImg = document.getElementById("img" + Node);
31 break;
33 oImg.src = imgMinus.src;
34 oTable.style.display = "block";
37 function hideNode(Node){
38 switch(navigator.family){
39 case 'nn4':
40 // Nav 4.x code fork...
41 var oTable = document.layers["span" + Node];
42 var oImg = document.layers["img" + Node];
43 break;
44 case 'ie4':
45 // IE 4/5 code fork...
46 var oTable = document.all["span" + Node];
47 var oImg = document.all["img" + Node];
48 break;
49 case 'gecko':
50 // Standards Compliant code fork...
51 var oTable = document.getElementById("span" + Node);
52 var oImg = document.getElementById("img" + Node);
53 break;
55 oImg.src = imgPlus.src;
56 oTable.style.display = "none";
59 function nodeIsVisible(Node){
60 switch(navigator.family){
61 case 'nn4':
62 // Nav 4.x code fork...
63 var oTable = document.layers["span" + Node];
64 break;
65 case 'ie4':
66 // IE 4/5 code fork...
67 var oTable = document.all["span" + Node];
68 break;
69 case 'gecko':
70 // Standards Compliant code fork...
71 var oTable = document.getElementById("span" + Node);
72 break;
74 return (oTable && oTable.style.display == "block");
77 function toggleNodeVisibility(Node){
78 if (nodeIsVisible(Node)){
79 hideNode(Node);
80 }else{
81 showNode(Node);
84 </script>
85 </head>
86 <body>
87 <div class="page-body">
88 <h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/AuthPlugins.php</h2>
90 <a name="sec-description"></a>
91 <div class="info-box">
92 <div class="info-box-title">Description</div>
93 <div class="nav-bar">
94 <span class="disabled">Description</span> |
95 <a href="#sec-includes">Includes</a>
96 | <a href="#sec-functions">Functions</a>
97 </div>
98 <div class="info-box-body">
99 <!-- ========== Info from phpDoc block ========= -->
100 <p class="short-description">The authentication handling plugins can be used by the Session class to provide authentication.</p>
101 <p class="description"><p>Each authenticate hook needs to: <ul><li>Accept a username / password</li><li>Confirm the username / password are correct</li><li>Create (or update) a 'usr' record in our database</li><li>Return the 'usr' record as an object</li><li>Return === false when authentication fails</li></ul> It can expect that: <ul><li>Configuration data will be in $c-&gt;authenticate_hook['config'], which might be an array, or whatever is needed.</li></ul> In order to be called: <ul><li>This file should be included</li><li>$c-&gt;authenticate_hook['call'] should be set to the name of the plugin</li><li>$c-&gt;authenticate_hook['config'] should be set up with any configuration data for the plugin</li></ul></p></p>
102 <ul class="tags">
103 <li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@mcmillan.net.nz">andrew@mcmillan.net.nz</a>&gt;</li>
104 <li><span class="field">copyright:</span> Catalyst IT Ltd, Morphoss Ltd &lt;http://www.morphoss.com/&gt;</li>
105 <li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2 or later</a></li>
106 </ul>
108 </div>
109 </div>
112 <a name="sec-includes"></a>
113 <div class="info-box">
114 <div class="info-box-title">Includes</div>
115 <div class="nav-bar">
116 <a href="#sec-description">Description</a> |
117 <span class="disabled">Includes</span>
118 | <a href="#sec-functions">Functions</a>
119 </div>
120 <div class="info-box-body">
121 <a name="_AWLUtilities_php"><!-- --></a>
122 <div class="evenrow">
124 <div>
125 <img src="../../media/images/Page.png" alt=" " />
126 <span class="include-title">
127 <span class="include-type">require_once</span>
128 (<span class="include-name"><a href="../../awl/Utilities/_AWLUtilities.php.html">'AWLUtilities.php'</a></span>)
129 (line <span class="line-number">28</span>)
130 </span>
131 </div>
133 <!-- ========== Info from phpDoc block ========= -->
135 </div>
136 <a name="_DataUpdate_php"><!-- --></a>
137 <div class="oddrow">
139 <div>
140 <img src="../../media/images/Page.png" alt=" " />
141 <span class="include-title">
142 <span class="include-type">require_once</span>
143 (<span class="include-name"><a href="../../awl/DataUpdate/_DataUpdate.php.html">'DataUpdate.php'</a></span>)
144 (line <span class="line-number">29</span>)
145 </span>
146 </div>
148 <!-- ========== Info from phpDoc block ========= -->
150 </div>
151 </div>
152 </div>
156 <a name="sec-functions"></a>
157 <div class="info-box">
158 <div class="info-box-title">Functions</div>
159 <div class="nav-bar">
160 <a href="#sec-description">Description</a> |
161 <a href="#sec-includes">Includes</a>
162 | <span class="disabled">Functions</span>
163 </div>
164 <div class="info-box-body">
165 <a name="functionauth_external" id="functionauth_external"><!-- --></a>
166 <div class="evenrow">
168 <div>
169 <img src="../../media/images/Function.png" />
170 <span class="method-title">auth_external</span> (line <span class="line-number">97</span>)
171 </div>
173 <!-- ========== Info from phpDoc block ========= -->
174 <p class="short-description">Authentication has already happened. We know the username, we just need to do the authorisation / access control. The password is ignored.</p>
175 <div class="method-signature">
176 <span class="method-result">void</span>
177 <span class="method-name">
178 auth_external
179 </span>
180 (<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$password</span>)
181 </div>
183 <ul class="parameters">
184 <li>
185 <span class="var-type"></span>
186 <span class="var-name">$username</span> </li>
187 <li>
188 <span class="var-type"></span>
189 <span class="var-name">$password</span> </li>
190 </ul>
193 </div>
194 <a name="functionauth_other_awl" id="functionauth_other_awl"><!-- --></a>
195 <div class="oddrow">
197 <div>
198 <img src="../../media/images/Function.png" />
199 <span class="method-title">auth_other_awl</span> (line <span class="line-number">37</span>)
200 </div>
202 <!-- ========== Info from phpDoc block ========= -->
203 <p class="short-description">Authenticate against a different PostgreSQL database which contains a usr table in the AWL format.</p>
204 <div class="method-signature">
205 <span class="method-result">void</span>
206 <span class="method-name">
207 auth_other_awl
208 </span>
209 (<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$password</span>)
210 </div>
212 <ul class="parameters">
213 <li>
214 <span class="var-type"></span>
215 <span class="var-name">$username</span> </li>
216 <li>
217 <span class="var-type"></span>
218 <span class="var-name">$password</span> </li>
219 </ul>
222 </div>
223 </div>
224 </div>
226 <p class="notes" id="credit">
227 Documentation generated on Tue, 28 Dec 2010 02:01:34 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
228 </p>
229 </div></body>
230 </html>