use of com.symphony.api.login.AuthenticationApi in project spring-bot by finos.
the class RSAAuthIT method testKeyManagerAuthWithRSA.
@ParameterizedTest
@MethodSource("setupConfigurations")
public void testKeyManagerAuthWithRSA(TestClientStrategy s) throws Exception {
SymphonyIdentity id = s.getIdentity();
String jwt = JWTHelper.createSignedJwt(id.getCommonName(), id.getPrivateKey());
AuthenticationApi keyApi = s.getRSAKeyAuthApi();
AuthenticateRequest req = new AuthenticateRequest();
req.setToken(jwt);
Token done = keyApi.pubkeyAuthenticatePost(req);
System.out.println(done);
}
use of com.symphony.api.login.AuthenticationApi in project spring-bot by finos.
the class RSAAuthIT method testSessionAuthWithRSA.
@ParameterizedTest
@MethodSource("setupConfigurations")
public void testSessionAuthWithRSA(TestClientStrategy s) throws Exception {
SymphonyIdentity id = s.getIdentity();
String jwt = JWTHelper.createSignedJwt(id.getCommonName(), id.getPrivateKey());
System.out.println(jwt);
System.out.println(JWTHelper.decodeJwt(jwt));
AuthenticationApi sessionApi = s.getRSASessionAuthApi();
AuthenticateRequest req = new AuthenticateRequest();
req.setToken(jwt);
Token done = sessionApi.pubkeyAuthenticatePost(req);
System.out.println(done);
}
Aggregations