All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.sdk.common.auth.v3.AuthClient Maven / Gradle / Ivy

There is a newer version: 3.6.4
Show newest version
/*
 * Copyright (C) 2016 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.sdk.common.auth.v3;


import com.opengamma.sdk.common.v3.ServiceInvoker;

/**
 * Client providing access to the auth service.
 * 

* Applications should not need to use this service directly. * The {@link ServiceInvoker} invokes authentication when required. */ public interface AuthClient { /** * Obtains an instance. * * @param invoker the service invoker * @return the client */ public static AuthClient of(ServiceInvoker invoker) { return InvokerAuthClient.of(invoker); } /** * Authenticates the user based on an API key. * * @param apiKey the API key * @param apiKeySecret the secret * @return the result containing the access token */ public abstract AccessTokenResult authenticateApiKey(String apiKey, String apiKeySecret); /** * Authenticates the use rbased on an API key. * @param credentials the API key and secret, encapsulated in an instance of {@link ApiKeyCredentials} * @return the result containing the access token */ public abstract AccessTokenResult authenticateApiKey(Credentials credentials); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy