Skip to content

Commit

Permalink
Fix authaware.
Browse files Browse the repository at this point in the history
  • Loading branch information
mducharme committed Feb 27, 2019
1 parent 8b4a55f commit d411f28
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Charcoal/User/AuthAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Charcoal\User;

/**
* Defines a class with authentication capabilities.
* Defines a class with authentication and authorization capabilities.
*
* Implementation, as trait, provided by {@see \Charcoal\User\AuthAwareTrait}.
*/
interface AuthAwareInterface
{
/**
* @return boolean
* @return booleans
*/
public function isAuthorized();

Expand Down
2 changes: 1 addition & 1 deletion src/Charcoal/User/AuthAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function isAuthorized()
* @param string[]|null $permissions The list of required permissions to check.
* @return boolean
*/
public function hasPermissions(array $permissions)
public function hasPermissions($permissions)
{
$authUser = $this->authenticator()->authenticate();
if (!$authUser) {
Expand Down
22 changes: 11 additions & 11 deletions src/Charcoal/User/UserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function sessionKey();
* Force a lowercase username
*
* @param string $username The username (also the login name).
@return self
* @return self
*/
public function setUsername($username);

Expand All @@ -32,7 +32,7 @@ public function username();

/**
* @param string $email The user email.
@return self
* @return self
*/
public function setEmail($email);

Expand All @@ -43,7 +43,7 @@ public function email();

/**
* @param string|null $password The user password. Encrypted in storage.
@return self
* @return self
*/
public function setPassword($password);

Expand All @@ -55,7 +55,7 @@ public function password();
/**
* @param string|string[]|null $roles The ACL roles this user belongs to.
* @throws \InvalidArgumentException If the roles argument is invalid.
@return self
* @return self
*/
public function setRoles($roles);

Expand All @@ -66,7 +66,7 @@ public function roles();

/**
* @param boolean $active The active flag.
@return self
* @return self
*/
public function setActive($active);

Expand All @@ -77,7 +77,7 @@ public function active();

/**
* @param string|\DateTimeInterface $ts The last login date.
@return self
* @return self
*/
public function setLastLoginDate($ts);

Expand All @@ -88,7 +88,7 @@ public function lastLoginDate();

/**
* @param string|integer|null $ip The last login IP address.
@return self
* @return self
*/
public function setLastLoginIp($ip);

Expand All @@ -100,7 +100,7 @@ public function lastLoginIp();

/**
* @param string|\DateTimeInterface $ts The last password date.
@return self
* @return self
*/
public function setLastPasswordDate($ts);

Expand All @@ -111,7 +111,7 @@ public function lastPasswordDate();

/**
* @param integer|string|null $ip The last password IP.
@return self
* @return self
*/
public function setLastPasswordIp($ip);

Expand All @@ -124,7 +124,7 @@ public function lastPasswordIp();

/**
* @param string $token The login token.
@return self
* @return self
*/
public function setLoginToken($token);

Expand All @@ -140,7 +140,7 @@ public function loginToken();
* Also updates the last password date & ip.
*
* @param string $plainPassword The plain (non-encrypted) password to reset to.
@return self
* @return self
*/
public function resetPassword($plainPassword);

Expand Down

0 comments on commit d411f28

Please sign in to comment.