kwin commented on code in PR #2372:
URL: https://github.com/apache/maven-resolver/pull/2372#discussion_r4730900299
##########
maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationContext.java:
##########
@@ -70,6 +70,26 @@ public final class AuthenticationContext implements
Closeable {
*/
public static final String PASSWORD = "password";
+ /**
+ * The key used to store the name of the HTTP header carrying the token
(see {@link #HTTP_TOKEN}), for example
+ * {@code Authorization} or {@code Private-Token}. The corresponding
authentication data should be of type
+ * {@link String}.
+ *
+ * @since 2.0.27
+ */
+ public static final String HTTP_TOKEN_HEADER = "http.token.header";
+
+ /**
+ * The key used to store the token: the full value of the HTTP header
named by {@link #HTTP_TOKEN_HEADER}, for
+ * example {@code Bearer <token>} for {@code Authorization}. The
corresponding authentication data should be of
+ * type {@code char[]} or {@link String}. HTTP transports (except Wagon)
send it preemptively, always scoped to the
+ * repository origin, and when the header is {@code Authorization}, it
takes precedence over {@link #USERNAME} and
+ * {@link #PASSWORD}.
+ *
+ * @since 2.0.27
Review Comment:
Found it in
https://github.com/apache/maven-resolver/pull/2372/changes#diff-0db3d99909616c53c2424db1c784325252457e7e7d3a59c4e0df8933f20e5b56R170.
--
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]