diff options
Diffstat (limited to 'tenant-auth/src/main/java/ai/vespa/hosted/auth/ApiAuthenticator.java')
-rw-r--r-- | tenant-auth/src/main/java/ai/vespa/hosted/auth/ApiAuthenticator.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tenant-auth/src/main/java/ai/vespa/hosted/auth/ApiAuthenticator.java b/tenant-auth/src/main/java/ai/vespa/hosted/auth/ApiAuthenticator.java new file mode 100644 index 00000000000..2b5bbb188dc --- /dev/null +++ b/tenant-auth/src/main/java/ai/vespa/hosted/auth/ApiAuthenticator.java @@ -0,0 +1,16 @@ +package ai.vespa.hosted.auth; + +import ai.vespa.hosted.api.ControllerHttpClient; +import ai.vespa.hosted.api.Properties; + +public class ApiAuthenticator implements ai.vespa.hosted.api.ApiAuthenticator { + + /** Returns an authenticating controller client, using private key signatures for authentication. */ + @Override + public ControllerHttpClient controller() { + return ControllerHttpClient.withSignatureKey(Properties.endpoint(), + Properties.privateKeyFile(), + Properties.application()); + } + +} |