1 | <?php |
||
28 | class AuthFactory |
||
29 | { |
||
30 | /** |
||
31 | * |
||
32 | * A session manager. |
||
33 | * |
||
34 | * @var SessionInterface |
||
35 | * |
||
36 | */ |
||
37 | protected $session; |
||
38 | |||
39 | /** |
||
40 | * |
||
41 | * A session segment. |
||
42 | * |
||
43 | * @var SegmentInterface |
||
44 | * |
||
45 | */ |
||
46 | protected $segment; |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | * Constructor. |
||
51 | * |
||
52 | * @param array $cookie A copy of $_COOKIES. |
||
53 | * |
||
54 | * @param SessionInterface $session A session manager. |
||
55 | * |
||
56 | * @param SegmentInterface $segment A session segment. |
||
57 | * |
||
58 | */ |
||
59 | 10 | public function __construct( |
|
74 | |||
75 | /** |
||
76 | * |
||
77 | * Returns a new authentication tracker. |
||
78 | * |
||
79 | * @return Auth |
||
80 | * |
||
81 | */ |
||
82 | 2 | public function newInstance() |
|
86 | |||
87 | /** |
||
88 | * |
||
89 | * Returns a new login service instance. |
||
90 | * |
||
91 | * @param AdapterInterface $adapter The adapter to use with the service. |
||
92 | * |
||
93 | * @return Service\LoginService |
||
94 | * |
||
95 | */ |
||
96 | 1 | public function newLoginService(AdapterInterface $adapter = null) |
|
103 | |||
104 | /** |
||
105 | * |
||
106 | * Returns a new logout service instance. |
||
107 | * |
||
108 | * @param AdapterInterface $adapter The adapter to use with the service. |
||
109 | * |
||
110 | * @return Service\LogoutService |
||
111 | * |
||
112 | */ |
||
113 | 1 | public function newLogoutService(AdapterInterface $adapter = null) |
|
120 | |||
121 | /** |
||
122 | * |
||
123 | * Returns a new "resume session" service. |
||
124 | * |
||
125 | * @param AdapterInterface $adapter The adapter to use with the service, and |
||
126 | * with the underlying logout service. |
||
127 | * |
||
128 | * @param int $idle_ttl The session idle time in seconds. |
||
129 | * |
||
130 | * @param int $expire_ttl The session expire time in seconds. |
||
131 | * |
||
132 | * @return Service\ResumeService |
||
133 | * |
||
134 | */ |
||
135 | 1 | public function newResumeService( |
|
162 | |||
163 | /** |
||
164 | * |
||
165 | * Make sure we have an Adapter instance, even if only a NullAdapter. |
||
166 | * |
||
167 | * @param Adapterinterface $adapter Check to make sure this is an Adapter |
||
168 | * instance. |
||
169 | * |
||
170 | * @return AdapterInterface |
||
171 | * |
||
172 | */ |
||
173 | 3 | protected function fixAdapter(AdapterInterface $adapter = null) |
|
180 | |||
181 | /** |
||
182 | * |
||
183 | * Returns a new PDO adapter. |
||
184 | * |
||
185 | * @param PDO $pdo A PDO connection. |
||
186 | * |
||
187 | * @param mixed $verifier_spec Specification to pick a verifier: if an |
||
188 | * object, assume a VerifierInterface; otherwise, assume a PASSWORD_* |
||
189 | * constant for a PasswordVerifier. |
||
190 | * |
||
191 | * @param array $cols Select these columns. |
||
192 | * |
||
193 | * @param string $from Select from this table (and joins). |
||
194 | * |
||
195 | * @param string $where WHERE conditions for the select. |
||
196 | * |
||
197 | * @return Adapter\PdoAdapter |
||
198 | * |
||
199 | */ |
||
200 | 2 | public function newPdoAdapter( |
|
221 | |||
222 | /** |
||
223 | * |
||
224 | * Returns a new HtpasswdAdapter. |
||
225 | * |
||
226 | * @param string $file Path to the htpasswd file. |
||
227 | * |
||
228 | * @return Adapter\HtpasswdAdapter |
||
229 | * |
||
230 | */ |
||
231 | 1 | public function newHtpasswdAdapter($file) |
|
239 | |||
240 | /** |
||
241 | * |
||
242 | * Returns a new ImapAdapter. |
||
243 | * |
||
244 | * @param string $mailbox An imap_open() mailbox string. |
||
245 | * |
||
246 | * @param int $options Options for the imap_open() call. |
||
247 | * |
||
248 | * @param int $retries Try to connect this many times. |
||
249 | * |
||
250 | * @param array $params Set these params after opening the connection. |
||
251 | * |
||
252 | * @return Adapter\ImapAdapter |
||
253 | * |
||
254 | */ |
||
255 | 1 | public function newImapAdapter( |
|
269 | |||
270 | /** |
||
271 | * |
||
272 | * Returns a new LdapAdapter. |
||
273 | * |
||
274 | * @param string $server An LDAP server string. |
||
275 | * |
||
276 | * @param string $dnformat A distinguished name format string for looking up |
||
277 | * the username. |
||
278 | * |
||
279 | * @param array $options Use these connection options. |
||
280 | * |
||
281 | * @return Adapter\LdapAdapter |
||
282 | * |
||
283 | */ |
||
284 | 1 | public function newLdapAdapter( |
|
296 | } |
||
297 |