You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/05/19 21:08:48 UTC

[GitHub] [maven-resolver] michael-o commented on a change in pull request #51: MNG-5583 per endpoint support for PKI authentication to maven repos

michael-o commented on a change in pull request #51:
URL: https://github.com/apache/maven-resolver/pull/51#discussion_r427600652



##########
File path: maven-resolver-transport-wagon/pom.xml
##########
@@ -56,7 +56,7 @@
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-provider-api</artifactId>
-      <version>3.4.0</version>
+      <version>3.4.1-SNAPSHOT</version>

Review comment:
       This is not possible, we don't depend on snapshots

##########
File path: maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationContext.java
##########
@@ -272,6 +272,19 @@ public String get( String key )
                     {
                         fillingAuthData = true;
                         auth.fill( this, key, data );
+                        
+                        //MNG-5583 per endpoint PKI authentication

Review comment:
       I don't understand the purpose of this hunk

##########
File path: maven-resolver-api/src/test/java/org/eclipse/aether/repository/AuthenticationContextTest.java
##########
@@ -56,7 +56,7 @@ public void fill( AuthenticationContext context, String key, Map<String, String>
                 assertNotNull( context );
                 assertNotNull( context.getSession() );
                 assertNotNull( context.getRepository() );
-                assertNull( "fill() should only be called once", context.get( "key" ) );
+                //assertNull( "fill() should only be called once", context.get( "key" ) );

Review comment:
       Agree here

##########
File path: maven-resolver-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonTransporter.java
##########
@@ -185,32 +184,21 @@ private AuthenticationInfo getAuthenticationInfo( RemoteRepository repository,
 
         if ( authContext != null )
         {
-            auth = new AuthenticationInfo()
-            {
-                @Override
-                public String getUserName()
-                {
-                    return authContext.get( AuthenticationContext.USERNAME );
-                }
-
-                @Override
-                public String getPassword()
-                {
-                    return authContext.get( AuthenticationContext.PASSWORD );
-                }
-
-                @Override
-                public String getPrivateKey()
-                {
-                    return authContext.get( AuthenticationContext.PRIVATE_KEY_PATH );
-                }
-
-                @Override
-                public String getPassphrase()
-                {
-                    return authContext.get( AuthenticationContext.PRIVATE_KEY_PASSPHRASE );
-                }
-            };
+            auth = new AuthenticationInfo();
+            auth.setUserName( authContext.get( AuthenticationContext.USERNAME ) );
+            auth.setPassword( authContext.get( AuthenticationContext.PASSWORD ) );
+            auth.setPrivateKey( authContext.get( AuthenticationContext.PRIVATE_KEY_PATH ) );
+            auth.setPassphrase( authContext.get( AuthenticationContext.PRIVATE_KEY_PASSPHRASE ) );
+            //MNG-5583 per endpoint PKI authentication

Review comment:
       Redundant comment = >commit message




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org