Completed
Push — master ( 98cee8...3492a0 )
by Temitope
02:23
created
src/Auth/Oauth.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $user = User::where('username', '=', $loginParams['username'])->get()->first();
91 91
 
92 92
             if (count($user) > 0) {
93
-                $userInfo = ['id' => $user->id,];
93
+                $userInfo = ['id' => $user->id, ];
94 94
 
95 95
                 if (password_verify($loginParams['password'], $user->password)) {
96 96
                     $token = $this->buildAcessToken($userInfo);
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
          * Create the token params as an array
162 162
          */
163 163
         $data = [
164
-            'iat'  => $issuedAt,         // Issued at: time when the token was generated
165
-            'jti'  => $tokenId,          // Json Token Id: an unique identifier for the token
166
-            'iss'  => $serverName,       // Issuer
167
-            'nbf'  => $notBefore,        // Not before
168
-            'exp'  => $expire,           // Expire
169
-            'dat'  => $userData,         // User Information retrieved from the database
164
+            'iat'  => $issuedAt, // Issued at: time when the token was generated
165
+            'jti'  => $tokenId, // Json Token Id: an unique identifier for the token
166
+            'iss'  => $serverName, // Issuer
167
+            'nbf'  => $notBefore, // Not before
168
+            'exp'  => $expire, // Expire
169
+            'dat'  => $userData, // User Information retrieved from the database
170 170
         ];
171 171
 
172 172
         $loadEnv = DatabaseConnection::loadEnv();
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $secretKey = base64_decode(getenv('secret'));
175 175
 
176 176
         $jwt = JWT::encode(
177
-        $data,      //Data to be encoded in the JWT
177
+        $data, //Data to be encoded in the JWT
178 178
         $secretKey, // The signing key
179 179
         'HS512'     // Algorithm used to sign the token
180 180
         );
Please login to merge, or discard this patch.