use of org.olat.login.oauth.spi.TequilaProvider in project OpenOLAT by OpenOLAT.
the class OAuthDispatcherTest method parseTequilaUserInfos.
@Test
public void parseTequilaUserInfos() {
String data = "{ \"Sciper\": \"M02491\", \"authscheme\": \"OAuth2\", \"Firstname\": \"Service\", \"Username\": \"Erecruiting_oAuth2\", \"Name\": \"Erecruiting_oAuth2\", \"scope\": \"Tequila.profile\" }";
OAuthUser infos = new TequilaProvider().parseResponse(data);
Assert.assertNotNull(infos);
Assert.assertEquals("Service", infos.getFirstName());
Assert.assertEquals("Erecruiting_oAuth2", infos.getLastName());
Assert.assertEquals("M02491", infos.getId());
}
use of org.olat.login.oauth.spi.TequilaProvider in project openolat by klemens.
the class OAuthDispatcherTest method parseTequilaUserInfos.
@Test
public void parseTequilaUserInfos() {
String data = "{ \"Sciper\": \"M02491\", \"authscheme\": \"OAuth2\", \"Firstname\": \"Service\", \"Username\": \"Erecruiting_oAuth2\", \"Name\": \"Erecruiting_oAuth2\", \"scope\": \"Tequila.profile\" }";
OAuthUser infos = new TequilaProvider().parseResponse(data);
Assert.assertNotNull(infos);
Assert.assertEquals("Service", infos.getFirstName());
Assert.assertEquals("Erecruiting_oAuth2", infos.getLastName());
Assert.assertEquals("M02491", infos.getId());
}
Aggregations