-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthenticationInterface.php
More file actions
96 lines (90 loc) · 2.22 KB
/
AuthenticationInterface.php
File metadata and controls
96 lines (90 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
/**
* Authentication Interface
*
* @package User
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
namespace CommonApi\User;
/**
* Authentication Interface
*
* @package User
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @since 1.0
*/
interface AuthenticationInterface
{
/**
* Guest - verify the Session
*
* @param string $session_id
*
* @return int $id
* @since 1.0.0
*/
public function isGuest($session_id);
/**
* Login - verify username and password, handle remember request if value is true
*
* @param string $session_id
* @param string $username
* @param string $password
* @param bool $remember
*
* @return int $id
* @since 1.0.0
*/
public function login($session_id, $username, $password, $remember = false);
/**
* Verify if the User is Logged On
*
* @param string $session_id
* @param string $username
*
* @return int
* @since 1.0.0
*/
public function isLoggedOn($session_id, $username);
/**
* Change the password for a user
*
* @param string $session_id
* @param string $username
* @param string $password
* @param string $reset_password_code
* @param bool $remember
*
* @return $this
* @since 1.0.0
*/
public function changePassword(
$session_id,
$username,
$password = '',
$reset_password_code = '',
$remember = false
);
/**
* Generate a token and email a temporary link to change password and sends to user
*
* @param string $username
* @param string $session_id
*
* @return $this
* @since 1.0.0
*/
public function requestPasswordReset($session_id, $username);
/**
* Log out and Redirect
*
* @param string $username
* @param string $session_id
*
* @return null
* @since 1.0.0
*/
public function logout($session_id, $username);
}