mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-14 14:05:52 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ac7a361fb | |||
|
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());
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ trait Wallets
|
|||||||
*/
|
*/
|
||||||
public function getWallets(): Result
|
public function getWallets(): Result
|
||||||
{
|
{
|
||||||
return $this->query('GET', 'wallets');
|
return $this->query('GET', 'wallet');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,7 +22,7 @@ trait Wallets
|
|||||||
*/
|
*/
|
||||||
public function setDefaultWallet(string $token): Result
|
public function setDefaultWallet(string $token): Result
|
||||||
{
|
{
|
||||||
return $this->query('PUT', 'wallets/default', [], null, [
|
return $this->query('PUT', 'wallet/default', [], null, [
|
||||||
'token' => $token
|
'token' => $token
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user