File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace SimpleSAML \Module \oidc \Server ;
44
5+ use CirrusIdentity \SSP \Utils \MetricLogger ;
56use Lcobucci \JWT \UnencryptedToken ;
67use League \OAuth2 \Server \AuthorizationServer as OAuth2AuthorizationServer ;
78use LogicException ;
@@ -75,6 +76,19 @@ public function validateAuthorizationRequest(ServerRequestInterface $request): O
7576 $ resultBag = $ this ->requestRulesManager ->check ($ request , $ rulesToExecute );
7677 } catch (OidcServerException $ exception ) {
7778 $ reason = sprintf ("%s %s " , $ exception ->getMessage (), $ exception ->getHint () ?? '' );
79+ MetricLogger::getInstance ()->logMetric (
80+ 'oidc ' ,
81+ 'error ' ,
82+ [
83+ 'message ' => $ reason ,
84+ 'oidc ' => [
85+ 'endpoint ' => 'authorize ' ,
86+ ]
87+ // authorize endpoint doesn't contain secrets so okay to log all params
88+ + $ request ->getQueryParams ()
89+
90+ ]
91+ );
7892 throw new BadRequest ($ reason );
7993 }
8094
You can’t perform that action at this time.
0 commit comments