2 Commits
3.2.1 ... 3.2.3

Author SHA1 Message Date
2ac7a361fb Update Wallets.php 2023-08-09 13:12:22 +02:00
1b8aef1f6f fix algorithm
Signed-off-by: envoyr <hello@envoyr.com>
2023-02-20 17:16:48 +01:00
4 changed files with 5 additions and 5 deletions

View File

@@ -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');
} }
} }

View File

@@ -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'
) )
); );
} }

View File

@@ -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());

View File

@@ -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
]); ]);
} }