Search in sources :

Example 1 with PlatformlayerAuthenticator

use of org.platformlayer.auth.PlatformlayerAuthenticator in project platformlayer by platformlayer.

the class HttpPlatformLayerClient method buildUsingConfiguration.

public static HttpPlatformLayerClient buildUsingConfiguration(HttpStrategy httpStrategy, PlatformLayerConnectionConfiguration config) {
    String project = config.tenant;
    String server = config.authenticationEndpoint;
    String username = config.username;
    String secret = config.secret;
    List<String> authTrustKeys = config.authTrustKeys;
    Authenticator authenticator = new PlatformlayerAuthenticator(httpStrategy, username, secret, server, authTrustKeys);
    ProjectId projectId = new ProjectId(project);
    return build(httpStrategy, config.platformlayerEndpoint, authenticator, projectId, config.platformlayerTrustKeys);
}
Also used : ProjectId(org.platformlayer.ids.ProjectId) PlatformlayerAuthenticator(org.platformlayer.auth.PlatformlayerAuthenticator) Authenticator(org.platformlayer.auth.Authenticator) PlatformlayerAuthenticator(org.platformlayer.auth.PlatformlayerAuthenticator)

Aggregations

Authenticator (org.platformlayer.auth.Authenticator)1 PlatformlayerAuthenticator (org.platformlayer.auth.PlatformlayerAuthenticator)1 ProjectId (org.platformlayer.ids.ProjectId)1