mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-14 14:05:52 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
1b8aef1f6f
|
@@ -77,6 +77,6 @@ class ApiTokenCookieFactory
|
|||||||
'sub' => $userId,
|
'sub' => $userId,
|
||||||
'csrf' => $csrfToken,
|
'csrf' => $csrfToken,
|
||||||
'expiry' => $expiration->getTimestamp(),
|
'expiry' => $expiration->getTimestamp(),
|
||||||
], $this->encrypter->getKey(), 'RS256');
|
], $this->encrypter->getKey(), 'HS256');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ class TokenGuard
|
|||||||
CookieValuePrefix::remove($this->encrypter->decrypt($request->cookie(BitinflowAccounts::cookie()), BitinflowAccounts::$unserializesCookies)),
|
CookieValuePrefix::remove($this->encrypter->decrypt($request->cookie(BitinflowAccounts::cookie()), BitinflowAccounts::$unserializesCookies)),
|
||||||
new Key(
|
new Key(
|
||||||
$this->encrypter->getKey(),
|
$this->encrypter->getKey(),
|
||||||
'RS256'
|
'HS256'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class JwtParser
|
|||||||
try {
|
try {
|
||||||
return JWT::decode(
|
return JWT::decode(
|
||||||
$request->bearerToken(),
|
$request->bearerToken(),
|
||||||
new Key($this->getOauthPublicKey(),'RS256')
|
new Key($this->getOauthPublicKey(), 'RS256')
|
||||||
);
|
);
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
throw (new AuthenticationException());
|
throw (new AuthenticationException());
|
||||||
|
|||||||
Reference in New Issue
Block a user