Search in sources :

Example 6 with AuthenticationStrategy

use of com.opentext.ia.sdk.support.http.rest.AuthenticationStrategy in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class WhenConfiguringAuthenticationStrategy method shouldGetTokenAuthenticationConfiguration.

@Test
public void shouldGetTokenAuthenticationConfiguration() {
    configuration.setAuthenticationToken(randomString());
    AuthenticationStrategy authentication = authFactory.getAuthenticationStrategy(() -> null, () -> null);
    assertTrue(authentication instanceof NonExpiringTokenAuthentication);
}
Also used : AuthenticationStrategy(com.opentext.ia.sdk.support.http.rest.AuthenticationStrategy) NonExpiringTokenAuthentication(com.opentext.ia.sdk.support.http.rest.NonExpiringTokenAuthentication) Test(org.junit.Test)

Aggregations

AuthenticationStrategy (com.opentext.ia.sdk.support.http.rest.AuthenticationStrategy)6 HttpClient (com.opentext.ia.sdk.support.http.HttpClient)3 ApacheHttpClient (com.opentext.ia.sdk.support.http.apache.ApacheHttpClient)3 Test (org.junit.Test)3 AuthenticationStrategyFactory (com.opentext.ia.sdk.client.api.AuthenticationStrategyFactory)2 JwtAuthentication (com.opentext.ia.sdk.support.http.rest.JwtAuthentication)2 RestClient (com.opentext.ia.sdk.support.http.rest.RestClient)2 InfoArchiveRestClient (com.opentext.ia.sdk.client.impl.InfoArchiveRestClient)1 Clock (com.opentext.ia.sdk.support.datetime.Clock)1 Header (com.opentext.ia.sdk.support.http.Header)1 BasicAuthentication (com.opentext.ia.sdk.support.http.rest.BasicAuthentication)1 GatewayInfo (com.opentext.ia.sdk.support.http.rest.GatewayInfo)1 NonExpiringTokenAuthentication (com.opentext.ia.sdk.support.http.rest.NonExpiringTokenAuthentication)1