File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,14 +196,21 @@ public function authorize() {
196196 $ getVars ['redirect_uri ' ]
197197 )
198198 );
199- $ clientId = $ this ->config ->saveClientRegistration ($ origin , $ clientData );
200- $ clientId = $ this ->config ->saveClientRegistration ($ getVars ['client_id ' ], $ clientData );
199+ $ clientId = $ this ->config ->saveClientRegistration ($ origin , $ clientData )[ ' client_id ' ] ;
200+ $ clientId = $ this ->config ->saveClientRegistration ($ getVars ['client_id ' ], $ clientData )[ ' client_id ' ] ;
201201 $ returnUrl = $ getVars ['redirect_uri ' ];
202202 } else {
203203 $ clientId = $ getVars ['client_id ' ];
204204 $ returnUrl = $ _SERVER ['REQUEST_URI ' ];
205205 }
206206
207+ $ clientRegistration = $ this ->config ->getClientRegistration ($ clientId );
208+ if ($ clientRegistration ['blocked ' ] === true ) {
209+ $ result = new JSONResponse ('Unauthorized client ' );
210+ $ result ->setStatus (403 );
211+ return $ result ;
212+ }
213+
207214 $ approval = $ this ->checkApproval ($ clientId );
208215 if (!$ approval ) {
209216 $ result = new JSONResponse ('Approval required ' );
You can’t perform that action at this time.
0 commit comments