-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIAuthenticationContext.php
More file actions
52 lines (45 loc) · 1.2 KB
/
IAuthenticationContext.php
File metadata and controls
52 lines (45 loc) · 1.2 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
<?php
/*
* Opulence
*
* @link https://www.opulencephp.com
* @copyright Copyright (C) 2021 David Young
* @license https://github.com/opulencephp/Opulence/blob/1.2/LICENSE.md
*/
namespace Opulence\Authentication;
/**
* Defines the interface for authentication contexts to implement
*/
interface IAuthenticationContext
{
/**
* Gets the current authentication status
*
* @return string The current authentication status
*/
public function getStatus() : string;
/**
* Gets the current subject, if there is one
*
* @return ISubject|null The current subject, if there is one, otherwise null
*/
public function getSubject();
/**
* Gets whether or not the current subject has been authenticated
*
* @return bool True if the current subject is authenticated, otherwise false
*/
public function isAuthenticated() : bool;
/**
* Sets the current status
*
* @param string $status The current status
*/
public function setStatus(string $status);
/**
* Sets the current subject
*
* @param ISubject $subject The current subject
*/
public function setSubject(ISubject $subject);
}