Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed Jan 30, 2020
1 parent 293ee50 commit ba89e2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fident.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getConfig(): FidentConfiguration

public function verifyJwt(string $rawJwt): bool
{
list($head64, $payload64, $sig64) = explode('.', $rawJwt, 3);
[$head64, $payload64, $sig64] = explode('.', $rawJwt, 3);
$header = json_decode(Strings::urlsafeBase64Decode($head64));
if(!$header || !isset($header->typ) || $header->typ !== 'JWT')
{
Expand All @@ -42,7 +42,7 @@ public function decodeJwtPayload(string $rawJwt): ?FidentJwtData
{
$data = new FidentJwtData();

list(, $payload64,) = explode('.', $rawJwt, 3);
[, $payload64,] = explode('.', $rawJwt, 3);
$payload = json_decode(Strings::urlsafeBase64Decode($payload64));
$payload->payload = Strings::urlsafeBase64Decode($payload->payload);

Expand Down

0 comments on commit ba89e2c

Please sign in to comment.