1 | <?php |
||
35 | class RealmWrapper implements RealmInterface |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * The object manager instance to be wrapped. |
||
40 | * |
||
41 | * @var \AppserverIo\Psr\Auth\RealmInterface |
||
42 | */ |
||
43 | protected $realm; |
||
44 | |||
45 | /** |
||
46 | * Injects the passed realm instance into this wrapper. |
||
47 | * |
||
48 | * @param \AppserverIo\Psr\Auth\RealmInterface $realm The realm instance used for initialization |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | public function injectRealm(RealmInterface $realm) |
||
56 | |||
57 | /** |
||
58 | * Return's the realm instance. |
||
59 | * |
||
60 | * @return \AppserverIo\Psr\Auth\RealmInterface The realm instance |
||
61 | */ |
||
62 | public function getRealm() |
||
66 | |||
67 | /** |
||
68 | * Return's the name of the realm. |
||
69 | * |
||
70 | * @return string The realm's name |
||
71 | */ |
||
72 | public function getName() |
||
76 | |||
77 | /** |
||
78 | * Return's the realm's configuration. |
||
79 | * |
||
80 | * @return AppserverIo\Psr\Security\Auth\Login\SecurityDomainConfigurationInterface The realm's configuration |
||
81 | */ |
||
82 | public function getConfiguration() |
||
86 | |||
87 | /** |
||
88 | * Return's the exception stack. |
||
89 | * |
||
90 | * @return \AppserverIo\Collections\ArrayList The exception stack |
||
91 | */ |
||
92 | public function getExceptionStack() |
||
96 | |||
97 | /** |
||
98 | * Tries to authenticate the user with the passed username and password. |
||
99 | * |
||
100 | * @param \AppserverIo\Lang\String $username The name of the user to authenticate |
||
101 | * @param \AppserverIo\Lang\String $password The password used for authentication |
||
102 | * |
||
103 | * @return \AppserverIo\Security\PrincipalInterface|null The authenticated user principal |
||
104 | */ |
||
105 | public function authenticate(String $username, String $password) |
||
109 | |||
110 | /** |
||
111 | * Tries to authenticate the user with the passed username and callback handler. |
||
112 | * |
||
113 | * @param \AppserverIo\Lang\String $username The name of the user to authenticate |
||
114 | * @param \AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler The callback handler used to load the credentials |
||
115 | * |
||
116 | * @return \AppserverIo\Security\PrincipalInterface|null The authenticated user principal |
||
117 | */ |
||
118 | public function authenticateByUsernameAndCallbackHandler(String $username, CallbackHandlerInterface $callbackHandler) |
||
122 | } |
||
123 |