Completed
Push — master ( 6e52f0...d9a404 )
by Alexandre
02:29
created
src/OAuth2/Flows/AuthorizationCodeFlow.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     function handle(array $requestData): array
21 21
     {
22
-       return ['code' => '123'];
22
+        return ['code' => '123'];
23 23
     }
24 24
 
25 25
     function getDefaultResponseMode(): string
Please login to merge, or discard this patch.
src/OAuth2/Endpoints/AuthorizationEndpoint.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,11 +184,11 @@
 block discarded – undo
184 184
 
185 185
 
186 186
         $responseModeIdentifier = $requestData['response_mode'] ?? $this->getResponseType()->getDefaultResponseMode();
187
-        if(!($responseMode = $this->responseModeManager->getResponseMode($responseModeIdentifier))) {
187
+        if (!($responseMode = $this->responseModeManager->getResponseMode($responseModeIdentifier))) {
188 188
             throw new OAuthException('invalid_request', 'response_mode invalid');
189 189
         }
190 190
 
191
-        if(in_array($responseModeIdentifier, $this->getResponseType()->getUnsupportedResponseModes())) {
191
+        if (in_array($responseModeIdentifier, $this->getResponseType()->getUnsupportedResponseModes())) {
192 192
             throw new OAuthException('invalid_request', 'response_mode unsupported');
193 193
         }
194 194
         $this->responseMode = $responseMode;
Please login to merge, or discard this patch.
src/OAuth2/OpenID/Endpoints/AuthorizationEndpoint.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
              */
48 48
             $scope = $requestData['scope'] ?? '';
49 49
             $scopes = explode(' ', $scope);
50
-            if(!in_array('openid', $scopes)) {
50
+            if (!in_array('openid', $scopes)) {
51 51
                 return parent::handleRequest($request);
52 52
             }
53 53
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@
 block discarded – undo
121 121
              * specified in the Authorization Request using the application/x-www-form-urlencoded format,
122 122
              * unless a different Response Mode was specified.
123 123
              */
124
-        }
125
-        catch (OAuthException $e) {
124
+        } catch (OAuthException $e) {
126 125
             /**
127 126
              * If the Authorization Server encounters any error, it MUST return an error response, per Section 3.1.2.6.
128 127
              */
Please login to merge, or discard this patch.
src/OAuth2/IdToken.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     function getClaims() : array
27 27
     {
28
-       return $this->claims;
28
+        return $this->claims;
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
src/OAuth2/ResponseModes/QueryResponseMode.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
 {
17 17
     function buildResponse(array $requestData, array $responseData): ResponseInterface
18 18
     {
19
-       return new Response();
19
+        return new Response();
20 20
     }
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
src/OAuth2OLD/OpenID/ResponseTypes/IdTokenResponseType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,25 +74,25 @@  discard block
 block discarded – undo
74 74
         ];
75 75
 
76 76
         // todo, include if auth_time is marked as an essential claim by the client otherwise it is optional (conf ?)
77
-        if(isset($data['max_age']) && $data['max_age']) {
77
+        if (isset($data['max_age']) && $data['max_age']) {
78 78
             $claims['auth_time'] = $resourceOwner->getTimeWhenAuthenticationOccured();
79 79
         }
80 80
 
81
-        if(isset($data['nonce']) && !is_null($data['nonce'])) {
81
+        if (isset($data['nonce']) && !is_null($data['nonce'])) {
82 82
             $claims['nonce'] = $data['nonce'];
83 83
         }
84 84
 
85
-        if(empty($extendedResponseTypes)) {
85
+        if (empty($extendedResponseTypes)) {
86 86
             $standardClaims = $this->userInfoClaimsStorage->getClaims($resourceOwner);
87 87
 
88 88
             foreach ($this->userInfoClaimsStorage->getClaimsByScope($scope) as $claimRequested) {
89
-                if(isset($standardClaims[$claimRequested]) && $standardClaims[$claimRequested]) {
89
+                if (isset($standardClaims[$claimRequested]) && $standardClaims[$claimRequested]) {
90 90
                     $claims[$claimRequested] = $standardClaims[$claimRequested];
91 91
                 }
92 92
             }
93 93
         }
94 94
 
95
-        if(isset($extendedResponseTypes['code'])) {
95
+        if (isset($extendedResponseTypes['code'])) {
96 96
             //c_hash
97 97
             /**
98 98
              * @var \OAuth2OLD\ResponseTypes\ResponseTypeInterface $responseType
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $claims['c_hash'] = 'todo'; //todo
104 104
         }
105 105
 
106
-        if(isset($extendedResponseTypes['token'])) {
106
+        if (isset($extendedResponseTypes['token'])) {
107 107
             //at_hash
108 108
             /**
109 109
              * @var \OAuth2OLD\ResponseTypes\ResponseTypeInterface $responseType
Please login to merge, or discard this patch.