1<?php
2/**
3 * Federated Login for DokuWiki - authorization service stub class
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @link       http://www.dokuwiki.org/plugin:fedauth
7 * @author     Aoi Karasu <aoikarasu@gmail.com>
8 */
9
10/**
11 * A stub class that emulates an interface between the real
12 * authorization client service implementations and their consumers.
13 *
14 * @author     Aoi Karasu <aoikarasu@gmail.com>
15 */
16class fa_service {
17
18    /**
19     * Authorization provider configuration object.
20     */
21    var $provider = null;
22
23    /**
24     * Creates the class instance bound to a provider object.
25     *
26     * @param objref $provider authorization provider configuration object
27     */
28    function __construct(&$provider) {
29        $this->provider =& $provider;
30    }
31
32    /**
33     * When overriden, performs the authorization request.
34     *
35     * @param string $username customized string required to perform the request, most likely an username
36     * @param string $return_to an URL user by the authorization service to pass the response (result)
37     */
38    function request($username, $return_to) {
39    }
40
41    /**
42     * When overriden, processes the authorization response.
43     *
44     * @param string $ref referer string used to identify the authorization request
45     */
46    function response($ref) {
47    }
48
49} /* fa_service */
50
51/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
52