Class ChainedAuthentication
- java.lang.Object
-
- org.eclipse.aether.util.repository.ChainedAuthentication
-
- All Implemented Interfaces:
Authentication
final class ChainedAuthentication extends java.lang.Object implements Authentication
Authentication that aggregates other authentication blocks. When multiple input authentication blocks provide the same authentication key, the last written value wins.
-
-
Field Summary
Fields Modifier and Type Field Description private Authentication[]authentications
-
Constructor Summary
Constructors Constructor Description ChainedAuthentication(java.util.Collection<? extends Authentication> authentications)ChainedAuthentication(Authentication... authentications)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddigest(AuthenticationDigest digest)Updates the given digest with data from this authentication callback.booleanequals(java.lang.Object obj)voidfill(AuthenticationContext context, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> data)Fills the given authentication context with the data from this authentication callback.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
authentications
private final Authentication[] authentications
-
-
Constructor Detail
-
ChainedAuthentication
ChainedAuthentication(Authentication... authentications)
-
ChainedAuthentication
ChainedAuthentication(java.util.Collection<? extends Authentication> authentications)
-
-
Method Detail
-
fill
public void fill(AuthenticationContext context, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> data)
Description copied from interface:AuthenticationFills the given authentication context with the data from this authentication callback. To do so, implementors have to callAuthenticationContext.put(String, Object).
Thekeyparameter supplied to this method acts merely as a hint for interactive callbacks that want to prompt the user for only that authentication data which is required. Implementations are free to ignore this parameter and put all the data they have into the authentication context at once.- Specified by:
fillin interfaceAuthentication- Parameters:
context- The authentication context to populate, must not benull.key- The key denoting a specific piece of authentication data that is being requested for a network operation, may benull.data- Any (read-only) extra data in form of key value pairs that might be useful when getting the authentication data, may benull.
-
digest
public void digest(AuthenticationDigest digest)
Description copied from interface:AuthenticationUpdates the given digest with data from this authentication callback. To do so, implementors have to call theupdate()methods inAuthenticationDigest.- Specified by:
digestin interfaceAuthentication- Parameters:
digest- The digest to update, must not benull.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-