use of io.jans.ca.client.ClientInterface in project jans by JanssenProject.
the class GetTokensByCodeTest method getToken_withES384.
@Parameters({ "host", "opHost", "redirectUrls", "userId", "userSecret" })
@Test
public void getToken_withES384(String host, String opHost, String redirectUrls, String userId, String userSecret) {
ClientInterface client = Tester.newClient(host);
final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrls, "ES384");
GetTokensByCodeResponse2 tokensResponse = tokenByCode(client, site, opHost, userId, userSecret, site.getClientId(), redirectUrls, CoreUtils.secureRandomString(), CoreUtils.secureRandomString());
}
use of io.jans.ca.client.ClientInterface in project jans by JanssenProject.
the class GetTokensByCodeTest method withAuthenticationMethod_shouldGetTokenInResponse.
@Parameters({ "host", "opHost", "redirectUrls", "userId", "userSecret" })
@Test
public void withAuthenticationMethod_shouldGetTokenInResponse(String host, String opHost, String redirectUrls, String userId, String userSecret) {
ClientInterface client = Tester.newClient(host);
final RegisterSiteResponse site = RegisterSiteTest.registerSite_withAuthenticationMethod(client, opHost, redirectUrls, "PS256", AuthenticationMethod.PRIVATE_KEY_JWT.toString());
GetTokensByCodeResponse2 tokensResponse = tokenByCode(client, site, opHost, userId, userSecret, site.getClientId(), redirectUrls, CoreUtils.secureRandomString(), CoreUtils.secureRandomString(), AuthenticationMethod.PRIVATE_KEY_JWT.toString(), "PS256");
}
use of io.jans.ca.client.ClientInterface in project jans by JanssenProject.
the class GetTokensByCodeTest method getToken_withPS256.
@Parameters({ "host", "opHost", "redirectUrls", "userId", "userSecret" })
@Test
public void getToken_withPS256(String host, String opHost, String redirectUrls, String userId, String userSecret) {
ClientInterface client = Tester.newClient(host);
final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrls, "PS256");
GetTokensByCodeResponse2 tokensResponse = tokenByCode(client, site, opHost, userId, userSecret, site.getClientId(), redirectUrls, CoreUtils.secureRandomString(), CoreUtils.secureRandomString());
}
use of io.jans.ca.client.ClientInterface in project jans by JanssenProject.
the class GetTokensByCodeTest method getToken_withPS512.
@Parameters({ "host", "opHost", "redirectUrls", "userId", "userSecret" })
@Test
public void getToken_withPS512(String host, String opHost, String redirectUrls, String userId, String userSecret) {
ClientInterface client = Tester.newClient(host);
final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrls, "PS512");
GetTokensByCodeResponse2 tokensResponse = tokenByCode(client, site, opHost, userId, userSecret, site.getClientId(), redirectUrls, CoreUtils.secureRandomString(), CoreUtils.secureRandomString());
}
use of io.jans.ca.client.ClientInterface in project jans by JanssenProject.
the class GetTokensByCodeTest method getToken_withNoneAlgo.
@Parameters({ "host", "opHost", "redirectUrls", "userId", "userSecret" })
@Test
public void getToken_withNoneAlgo(String host, String opHost, String redirectUrls, String userId, String userSecret) {
ClientInterface client = Tester.newClient(host);
final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrls, "none");
GetTokensByCodeResponse2 tokensResponse = tokenByCode(client, site, opHost, userId, userSecret, site.getClientId(), redirectUrls, CoreUtils.secureRandomString(), CoreUtils.secureRandomString());
}
Aggregations