Class AuthConfigFactory
- java.lang.Object
-
- nl.lexemmens.podman.authentication.AuthConfigFactory
-
public class AuthConfigFactory extends Object
Factory class to build anAuthConfiginstance for a specific registry. Authentication information is retrieved from the Maven settings.
-
-
Constructor Summary
Constructors Constructor Description AuthConfigFactory(org.apache.maven.settings.Settings mavenSettings, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)Constructs a new instance of this factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<AuthConfig>getAuthConfigForRegistry(String registry)Returns anOptionalthat may hold an instance of anAuthConfigclass holding authentication information for the provided registry.
-
-
-
Constructor Detail
-
AuthConfigFactory
public AuthConfigFactory(org.apache.maven.settings.Settings mavenSettings, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)Constructs a new instance of this factory.- Parameters:
mavenSettings- The Maven SettingssettingsDecrypter- The SettingsDecrypter in case authentication data is encrypted
-
-
Method Detail
-
getAuthConfigForRegistry
public Optional<AuthConfig> getAuthConfigForRegistry(String registry)
Returns anOptionalthat may hold an instance of anAuthConfigclass holding authentication information for the provided registry. Returns anOptional.empty()if no credentials could be found in the Maven settings- Parameters:
registry- The registry- Returns:
- An Optional that may hold authentication data for the provided registry
-
-