Search in sources :

Example 1 with CertificateAuthenticationApi

use of com.symphony.api.authenticator.CertificateAuthenticationApi in project spring-bot by finos.

the class PodInfoStoreTokenStrategy method certBasedRequest.

@Override
protected ExtensionAppTokens certBasedRequest(String appToken, PodInfo pod) throws Exception {
    ApiBuilder ab = setupApiBuilder(pod, pod.getPayload().getSessionAuthUrl());
    CertificateAuthenticationApi aa = ab.getApi(CertificateAuthenticationApi.class);
    ExtensionAppAuthenticateRequest ar = new ExtensionAppAuthenticateRequest();
    ar.setAppToken(appToken);
    ExtensionAppTokens out = aa.v1AuthenticateExtensionAppPost(ar);
    return out;
}
Also used : ExtensionAppTokens(com.symphony.api.model.ExtensionAppTokens) ExtensionAppAuthenticateRequest(com.symphony.api.model.ExtensionAppAuthenticateRequest) CertificateAuthenticationApi(com.symphony.api.authenticator.CertificateAuthenticationApi) ApiBuilder(com.symphony.api.bindings.ApiBuilder) ConfigurableApiBuilder(com.symphony.api.bindings.ConfigurableApiBuilder)

Example 2 with CertificateAuthenticationApi

use of com.symphony.api.authenticator.CertificateAuthenticationApi in project spring-bot by finos.

the class ConfiguredPodTokenStrategy method certBasedRequest.

protected ExtensionAppTokens certBasedRequest(String appToken, PodProperties pod) throws Exception {
    ConfigurableApiBuilder ab = abf.getObject();
    pod.getSessionAuth().configure(ab, new ApiWrapper[] {}, appIdentity, trustManagers);
    CertificateAuthenticationApi aa = ab.getApi(CertificateAuthenticationApi.class);
    ExtensionAppAuthenticateRequest ar = new ExtensionAppAuthenticateRequest();
    ar.setAppToken(appToken);
    ExtensionAppTokens out = aa.v1AuthenticateExtensionAppPost(ar);
    return out;
}
Also used : ExtensionAppTokens(com.symphony.api.model.ExtensionAppTokens) ConfigurableApiBuilder(com.symphony.api.bindings.ConfigurableApiBuilder) ExtensionAppAuthenticateRequest(com.symphony.api.model.ExtensionAppAuthenticateRequest) CertificateAuthenticationApi(com.symphony.api.authenticator.CertificateAuthenticationApi)

Aggregations

CertificateAuthenticationApi (com.symphony.api.authenticator.CertificateAuthenticationApi)2 ConfigurableApiBuilder (com.symphony.api.bindings.ConfigurableApiBuilder)2 ExtensionAppAuthenticateRequest (com.symphony.api.model.ExtensionAppAuthenticateRequest)2 ExtensionAppTokens (com.symphony.api.model.ExtensionAppTokens)2 ApiBuilder (com.symphony.api.bindings.ApiBuilder)1