Completed
Push — master ( 71bbce...de7444 )
by Temitope
02:21
created
src/Auth/Oauth.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $tokenId = base64_encode(mcrypt_create_iv(32));
67 67
         $issuedAt = time();
68
-        $notBefore = $issuedAt;  //Adding 10 seconds
68
+        $notBefore = $issuedAt; //Adding 10 seconds
69 69
         $expire = $notBefore + (float) strtotime('+30 days'); // Adding 30 days expiry date
70 70
         $serverName = "http://sweatemoji.com/api"; // Retrieve the server name
71 71
 
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
          * Create the token params as an array
75 75
          */
76 76
         $data = [
77
-            'iat'  => $issuedAt,         // Issued at: time when the token was generated
78
-            'jti'  => $tokenId,          // Json Token Id: an unique identifier for the token
79
-            'iss'  => $serverName,       // Issuer
80
-            'nbf'  => $notBefore,        // Not before
81
-            'exp'  => $expire,           // Expire
77
+            'iat'  => $issuedAt, // Issued at: time when the token was generated
78
+            'jti'  => $tokenId, // Json Token Id: an unique identifier for the token
79
+            'iss'  => $serverName, // Issuer
80
+            'nbf'  => $notBefore, // Not before
81
+            'exp'  => $expire, // Expire
82 82
 
83 83
             'dat'  => $userData                   // User Information retrieved from the database
84 84
         ];
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $secretKey = base64_decode(getenv('secret'));
89 89
 
90 90
         $jwt = JWT::encode(
91
-        $data,      //Data to be encoded in the JWT
91
+        $data, //Data to be encoded in the JWT
92 92
         $secretKey, // The signing key
93 93
         'HS512'     // Algorithm used to sign the token
94 94
         );
Please login to merge, or discard this patch.