Completed
Push — master ( 6e52f0...d9a404 )
by Alexandre
02:29
created
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 1 patch
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.
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.