adutra commented on code in PR #12555: URL: https://github.com/apache/iceberg/pull/12555#discussion_r2012845154
########## core/src/main/java/org/apache/iceberg/rest/auth/AuthManager.java: ########## @@ -33,74 +33,62 @@ public interface AuthManager extends AutoCloseable { /** - * Returns a temporary session to use for contacting the configuration endpoint only. Note that - * the returned session will be closed after the configuration endpoint is contacted, and should - * not be cached. + * Returns a manager that uses the given REST client for its internal authentication requests, + * such as for fetching tokens or refreshing credentials. * - * <p>The provided REST client is a short-lived client; it should only be used to fetch initial - * credentials, if required, and must be discarded after that. - * - * <p>This method cannot return null. By default, it returns the catalog session. + * <p>By default, this method ignores the REST client and returns {@code this}. Implementations + * that require a client should override this method. */ + default AuthManager withClient(RESTClient client) { + return this; + } + + /** Returns an authentication session for the given scope. */ + default AuthSession authSession(AuthScope scope) { + throw new UnsupportedOperationException("AuthManager.authSession is not implemented"); + } + + /** + * @deprecated since 1.9.0, will be removed in 1.10.0; use {@link #authSession(AuthScope)} + * instead. + */ + @Deprecated Review Comment: It was already a default method, I think it's safer to not change its implementation. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org