rombert commented on code in PR #27:
URL: 
https://github.com/apache/sling-org-apache-sling-auth-oauth-client/pull/27#discussion_r2254451626


##########
src/test/java/org/apache/sling/auth/oauth_client/impl/SlingUserInfoProcessorImplTest.java:
##########
@@ -175,6 +175,29 @@ void testStoreAccessToken() throws Exception {
         verify(cryptoService).encrypt(TEST_ACCESS_TOKEN);
     }
 
+    @Test
+    void testStoreRefreshToken() throws Exception {
+        SlingUserInfoProcessorImpl.Config cfg = Converters.standardConverter()
+                .convert(Map.of(
+                        "groupsInIdToken", false,
+                        "storeAccessToken", false,
+                        "storeRefreshToken", true,
+                        "groupsClaimName", "groups",
+                        "connection", "test"))
+                .to(SlingUserInfoProcessorImpl.Config.class);
+        processor = new SlingUserInfoProcessorImpl(cryptoService, cfg);
+
+        String tokenResponse = createTokenResponse(TEST_ACCESS_TOKEN, 
TEST_REFRESH_TOKEN);
+
+        OidcAuthCredentials result = processor.process(null, tokenResponse, 
TEST_SUBJECT, TEST_IDP);
+
+        assertNotNull(result);
+        // Note: There's a bug in the original code - it uses accessToken() 
instead of refreshToken()

Review Comment:
   I don't really understand this comment and the one on line R198. Can you 
please clarify @nscendoni ?
   
   If there's still a bug in the implementation please either reopen 
SLING-12871 or file a new one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to