Completed
Push — master ( 0417d6...3a7a41 )
by Bob Olde
02:15
created

ApiAuthPlugin::getDeveloperUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Craft;
4
5
/**
6
 * ApiAuth Plugin.
7
 *
8
 * Authentication plugin for an api
9
 *
10
 * @author    Nerds and company
11
 * @copyright Copyright (c) 2015, Nerds and company
12
 *
13
 * @link      http://www.itmundi.nl
14
 */
15
class ApiAuthPlugin extends BasePlugin
16
{
17
18
    /**
19
     * Return plugin name.
20
     *
21
     * @return string
22
     */
23
    public function getName()
24
    {
25
        return Craft::t('Api Authentication');
26
    }
27
28
    /**
29
     * Return plugin version.
30
     *
31
     * @return string
32
     */
33
    public function getVersion()
34
    {
35
        return '0.2';
36
    }
37
38
    /**
39
     * Return developer name.
40
     *
41
     * @return string
42
     */
43
    public function getDeveloper()
44
    {
45
        return 'Nerds and company';
46
    }
47
48
    /**
49
     * Return developer url.
50
     *
51
     * @return string
52
     */
53
    public function getDeveloperUrl()
54
    {
55
        return 'http://www.nerds.company';
56
    }
57
58
    /**
59
     * Register site routes.
60
     *
61
     * @return array
62
     */
63
    public function registerSiteRoutes()
64
    {
65
        return array(
66
            'api/authenticate' => array('action' => 'apiAuth/authenticate'),
67
            'api/resetPassword' => array('action' => 'apiAuth/resetPassword')
68
        );
69
    }
70
71
    /**
72
     * Load the abstract controller
73
     */
74
    public function init()
75
    {
76
        require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');
77
    }
78
}
79