Package org.mlflow.tracking.creds
Class BasicMlflowHostCreds
java.lang.Object
org.mlflow.tracking.creds.BasicMlflowHostCreds
- All Implemented Interfaces:
MlflowHostCreds
,MlflowHostCredsProvider
- Direct Known Subclasses:
DatabricksMlflowHostCreds
public class BasicMlflowHostCreds
extends Object
implements MlflowHostCreds, MlflowHostCredsProvider
A static hostname and optional credentials to talk to an MLflow server.
-
Constructor Summary
ConstructorDescriptionBasicMlflowHostCreds
(String host) BasicMlflowHostCreds
(String host, String token) BasicMlflowHostCreds
(String host, String username, String password) BasicMlflowHostCreds
(String host, String username, String password, String token, boolean shouldIgnoreTlsVerification) -
Method Summary
Modifier and TypeMethodDescriptiongetHost()
Hostname (e.g., http://localhost:5000) to MLflow server.Returns a valid MlflowHostCreds.Password to use with Basic authentication when talking to server.getToken()
Token to use with Bearer authentication when talking to server.Username to use with Basic authentication when talking to server.void
refresh()
Refreshes the underlying credentials.boolean
If true, we will not verify the server's hostname or TLS certificate.
-
Constructor Details
-
BasicMlflowHostCreds
-
BasicMlflowHostCreds
-
BasicMlflowHostCreds
-
BasicMlflowHostCreds
-
-
Method Details
-
getHost
Description copied from interface:MlflowHostCreds
Hostname (e.g., http://localhost:5000) to MLflow server.- Specified by:
getHost
in interfaceMlflowHostCreds
-
getUsername
Description copied from interface:MlflowHostCreds
Username to use with Basic authentication when talking to server. If this is specified, password must also be specified.- Specified by:
getUsername
in interfaceMlflowHostCreds
-
getPassword
Description copied from interface:MlflowHostCreds
Password to use with Basic authentication when talking to server. If this is specified, username must also be specified.- Specified by:
getPassword
in interfaceMlflowHostCreds
-
getToken
Description copied from interface:MlflowHostCreds
Token to use with Bearer authentication when talking to server. If provided, user/password authentication will be ignored.- Specified by:
getToken
in interfaceMlflowHostCreds
-
shouldIgnoreTlsVerification
public boolean shouldIgnoreTlsVerification()Description copied from interface:MlflowHostCreds
If true, we will not verify the server's hostname or TLS certificate. This is useful for certain testing situations, but should never be true in production.- Specified by:
shouldIgnoreTlsVerification
in interfaceMlflowHostCreds
-
getHostCreds
Description copied from interface:MlflowHostCredsProvider
Returns a valid MlflowHostCreds. This may be cached.- Specified by:
getHostCreds
in interfaceMlflowHostCredsProvider
-
refresh
public void refresh()Description copied from interface:MlflowHostCredsProvider
Refreshes the underlying credentials. May be a no-op.- Specified by:
refresh
in interfaceMlflowHostCredsProvider
-