diff options
Diffstat (limited to 'Core/SecurityContextInterface.php')
-rw-r--r-- | Core/SecurityContextInterface.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php index 46b2cc4..2fc27b0 100644 --- a/Core/SecurityContextInterface.php +++ b/Core/SecurityContextInterface.php @@ -35,12 +35,19 @@ interface SecurityContextInterface * Sets the authentication token. * * @param TokenInterface $token - * - * @return void */ function setToken(TokenInterface $token = null); /** + * Returns the current user, if one exists. + * + * @return mixed Returns either an object which implements __toString(), + * or a primitive string if there is a token, otherwise + * returns null. + */ + function getUser(); + + /** * Checks if the attributes are granted against the current authentication token and optionally supplied object. * * @param array $attributes |