Skip to content

Commit

Permalink
$user => $username [Closes #73]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 4, 2024
1 parent d698efe commit 6e19bf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Security/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ interface Authenticator extends IAuthenticator
* Performs an authentication.
* @throws AuthenticationException
*/
function authenticate(string $user, string $password): IIdentity;
function authenticate(string $username, string $password): IIdentity;
}
8 changes: 4 additions & 4 deletions src/Security/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ final public function getStorage(): UserStorage

/**
* Conducts the authentication process. Parameters are optional.
* @param string|IIdentity $user name or Identity
* @param string|IIdentity $username name or Identity
* @throws AuthenticationException if authentication was not successful
*/
public function login(
string|IIdentity $user,
string|IIdentity $username,
#[\SensitiveParameter]
?string $password = null,
): void
{
$this->logout(true);
if ($user instanceof IIdentity) {
$this->identity = $user;
if ($username instanceof IIdentity) {
$this->identity = $username;
} else {
$authenticator = $this->getAuthenticator();
$this->identity = $authenticator instanceof Authenticator
Expand Down

0 comments on commit 6e19bf6

Please sign in to comment.