Skip to content

Commit

Permalink
Use some more Nette's PascalCase constants
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Oct 28, 2023
1 parent 3b2d0ae commit cdc2289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/app/Tls/Certificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public function __construct(
public function authenticate(string $user, string $key): void
{
if (!isset($this->users[$user])) {
throw new AuthenticationException('Unknown user', Authenticator::IDENTITY_NOT_FOUND);
throw new AuthenticationException('Unknown user', Authenticator::IdentityNotFound);
}

if (!hash_equals($this->users[$user], hash('sha512', $key))) {
throw new AuthenticationException('Invalid key', Authenticator::INVALID_CREDENTIAL);
throw new AuthenticationException('Invalid key', Authenticator::InvalidCredential);
}
}

Expand Down

0 comments on commit cdc2289

Please sign in to comment.