@@ -80,10 +80,10 @@ class InMemoryCodeService(
8080
8181 _ <- codesRef.update(_ + (code -> authCode))
8282 _ = logger.info(
83- s " ✅ Generated authorization code: ${code.take(8 )}... for clientId: $clientId, redirectUri: $redirectUri, sub: $sub, expires in ${config.codeExpirationSeconds}s "
83+ s " Generated authorization code: ${code.take(8 )}... for clientId: $clientId, redirectUri: $redirectUri, sub: $sub, expires in ${config.codeExpirationSeconds}s "
8484 )
8585 totalCodes <- codesRef.get.map(_.size)
86- _ = logger.info(s " 🔍 Total codes in memory: $totalCodes" )
86+ _ = logger.info(s " Total codes in memory: $totalCodes" )
8787 } yield code
8888 }
8989
@@ -96,32 +96,32 @@ class InMemoryCodeService(
9696 s " validateAndConsumeCode ENTRY - code: ${code.take(8 )}..., clientId: $clientId"
9797 )
9898 logger.info(
99- s " 🔍 DEBUG: validateAndConsumeCode called with code: ${code.take(8 )}..., clientId: $clientId"
99+ s " DEBUG: validateAndConsumeCode called with code: ${code.take(8 )}..., clientId: $clientId"
100100 )
101101 for {
102102 codes <- codesRef.get
103103 _ = logger.trace(
104104 s " Found ${codes.size} stored codes in memory "
105105 )
106- _ = logger.info(s " 🔍 DEBUG: Found ${codes.size} stored codes " )
106+ _ = logger.info(s " DEBUG: Found ${codes.size} stored codes " )
107107 result <- codes.get(code) match {
108108 case Some (authCode) =>
109109 logger.trace(
110110 s " FOUND authorization code for client: ${authCode.client_id}, sub: ${authCode.sub}"
111111 )
112112 logger.info(
113- s " 🔍 DEBUG: Found authorization code for client: ${authCode.client_id}, sub: ${authCode.sub}"
113+ s " DEBUG: Found authorization code for client: ${authCode.client_id}, sub: ${authCode.sub}"
114114 )
115115 logger.info(
116- s " 🔍 DEBUG: Code expires at: ${authCode.exp}, current time: ${Instant .now().getEpochSecond}"
116+ s " DEBUG: Code expires at: ${authCode.exp}, current time: ${Instant .now().getEpochSecond}"
117117 )
118118 validateCode(authCode, clientId, redirectUri).flatMap {
119119 case Right (validCode) =>
120120 logger.trace(
121121 s " Authorization code validation SUCCESS for sub: ${validCode.sub}"
122122 )
123123 logger.info(
124- s " ✅ DEBUG: Authorization code validated successfully for sub: ${validCode.sub}"
124+ s " DEBUG: Authorization code validated successfully for sub: ${validCode.sub}"
125125 )
126126 // Consume the code (remove it after use)
127127 codesRef.update(_ - code).as(validCode.asRight[OidcError ])
@@ -131,7 +131,7 @@ class InMemoryCodeService(
131131 .getOrElse(" No description" )}"
132132 )
133133 logger.warn(
134- s " ❌ DEBUG: Authorization code validation failed: ${error.error} - ${error.error_description
134+ s " DEBUG: Authorization code validation failed: ${error.error} - ${error.error_description
135135 .getOrElse(" No description" )}"
136136 )
137137 // Remove invalid code
@@ -142,13 +142,13 @@ class InMemoryCodeService(
142142 s " Authorization code NOT FOUND: ${code.take(8 )}... "
143143 )
144144 logger.warn(
145- s " ❌ DEBUG: Authorization code not found: ${code.take(8 )}... "
145+ s " DEBUG: Authorization code not found: ${code.take(8 )}... "
146146 )
147147 logger.warn(
148- s " ❌ DEBUG: Available codes in memory: ${codes.keys.map(_.take(8 )).mkString(" , " )}"
148+ s " DEBUG: Available codes in memory: ${codes.keys.map(_.take(8 )).mkString(" , " )}"
149149 )
150150 logger.warn(
151- s " ❌ DEBUG: Looking for exact code match for clientId: $clientId, redirectUri: $redirectUri"
151+ s " DEBUG: Looking for exact code match for clientId: $clientId, redirectUri: $redirectUri"
152152 )
153153 IO .pure(
154154 OidcError (" invalid_grant" , Some (" Authorization code not found" ))
@@ -167,32 +167,32 @@ class InMemoryCodeService(
167167 val now = Instant .now().getEpochSecond
168168
169169 logger.info(
170- s " 🔍 DEBUG: Validating code - Expected clientId: ${authCode.client_id}, Provided: $clientId"
170+ s " DEBUG: Validating code - Expected clientId: ${authCode.client_id}, Provided: $clientId"
171171 )
172172 logger.info(
173- s " 🔍 DEBUG: Validating code - Expected redirectUri: ${authCode.redirect_uri}, Provided: $redirectUri"
173+ s " DEBUG: Validating code - Expected redirectUri: ${authCode.redirect_uri}, Provided: $redirectUri"
174174 )
175175
176176 if (authCode.exp < now) {
177177 logger.warn(
178- s " ❌ DEBUG: Authorization code expired (exp: ${authCode.exp}, now: $now) "
178+ s " DEBUG: Authorization code expired (exp: ${authCode.exp}, now: $now) "
179179 )
180180 OidcError (" invalid_grant" , Some (" Authorization code expired" ))
181181 .asLeft[AuthorizationCode ]
182182 } else if (authCode.client_id != clientId) {
183183 logger.warn(
184- s " ❌ DEBUG: Client ID mismatch (expected: ${authCode.client_id}, got: $clientId) "
184+ s " DEBUG: Client ID mismatch (expected: ${authCode.client_id}, got: $clientId) "
185185 )
186186 OidcError (" invalid_grant" , Some (" Client ID mismatch" ))
187187 .asLeft[AuthorizationCode ]
188188 } else if (authCode.redirect_uri != redirectUri) {
189189 logger.warn(
190- s " ❌ DEBUG: Redirect URI mismatch (expected: ${authCode.redirect_uri}, got: $redirectUri) "
190+ s " DEBUG: Redirect URI mismatch (expected: ${authCode.redirect_uri}, got: $redirectUri) "
191191 )
192192 OidcError (" invalid_grant" , Some (" Redirect URI mismatch" ))
193193 .asLeft[AuthorizationCode ]
194194 } else {
195- logger.info(s " ✅ DEBUG: All validations passed for code" )
195+ logger.info(s " DEBUG: All validations passed for code " )
196196 authCode.asRight[OidcError ]
197197 }
198198 }
0 commit comments