mthmulders commented on a change in pull request #51:
URL: https://github.com/apache/maven-resolver/pull/51#discussion_r427057035
##########
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
+ auth.setKeyAlias( authContext.get( "getKeyAlias" ) );
Review comment:
The above keys are pre-defined constants in Aether, and so we may assume
they correspond to existing data in the `AuthenticationContext`. The keys below
have a different naming structure (they all start with `get`) and I'm not sure
how the data we're looking for actually ended up there?
----------------------------------------------------------------
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:
[email protected]