Completed
Push — master ( 4a42a6...431989 )
by Joao
02:10
created
src/JwtWrapper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $tokenId    = base64_encode(openssl_random_pseudo_bytes(32));
31 31
         $issuedAt   = time();
32
-        $notBefore  = $issuedAt + $secondsNotBefore;          //Adding 10 seconds
33
-        $expire     = $notBefore + $secondsExpire;            // Adding 60 seconds
34
-        $serverName = $this->serverName;                       // Retrieve the server name from config file
32
+        $notBefore  = $issuedAt + $secondsNotBefore; //Adding 10 seconds
33
+        $expire     = $notBefore + $secondsExpire; // Adding 60 seconds
34
+        $serverName = $this->serverName; // Retrieve the server name from config file
35 35
 
36 36
         /*
37 37
          * Create the token as an array
38 38
          */
39 39
         return [
40
-            'iat'  => $issuedAt,         // Issued at: time when the token was generated
41
-            'jti'  => $tokenId,          // Json Token Id: an unique identifier for the token
42
-            'iss'  => $serverName,       // Issuer
43
-            'nbf'  => $notBefore,        // Not before
44
-            'exp'  => $expire,           // Expire
40
+            'iat'  => $issuedAt, // Issued at: time when the token was generated
41
+            'jti'  => $tokenId, // Json Token Id: an unique identifier for the token
42
+            'iss'  => $serverName, // Issuer
43
+            'nbf'  => $notBefore, // Not before
44
+            'exp'  => $expire, // Expire
45 45
             'data' => $data              // Data related to the signer user
46 46
         ];
47 47
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
          * The output string can be validated at http://jwt.io/
58 58
          */
59 59
         $jwt = JWT::encode(
60
-            $jwtData,      //Data to be encoded in the JWT
60
+            $jwtData, //Data to be encoded in the JWT
61 61
             $secretKey, // The signing key
62 62
             JwtWrapper::CRYPTO_ALGHORITM
63 63
         );
Please login to merge, or discard this patch.