use of org.olat.login.oauth.spi.FacebookProvider in project OpenOLAT by OpenOLAT.
the class OAuthDispatcherTest method parseUserInfos_facebook.
@Test
public void parseUserInfos_facebook() throws IOException {
URL jsonUrl = OAuthDispatcherTest.class.getResource("me_facebook.json");
String body = IOUtils.toString(jsonUrl, "UTF-8");
OAuthUser infos = new FacebookProvider().parseInfos(body);
Assert.assertNotNull(infos);
Assert.assertEquals("4", infos.getId());
Assert.assertEquals("John", infos.getFirstName());
Assert.assertEquals("Smith", infos.getLastName());
Assert.assertEquals("en_US", infos.getLang());
}
use of org.olat.login.oauth.spi.FacebookProvider in project openolat by klemens.
the class OAuthDispatcherTest method parseUserInfos_facebook.
@Test
public void parseUserInfos_facebook() throws IOException {
URL jsonUrl = OAuthDispatcherTest.class.getResource("me_facebook.json");
String body = IOUtils.toString(jsonUrl, "UTF-8");
OAuthUser infos = new FacebookProvider().parseInfos(body);
Assert.assertNotNull(infos);
Assert.assertEquals("4", infos.getId());
Assert.assertEquals("John", infos.getFirstName());
Assert.assertEquals("Smith", infos.getLastName());
Assert.assertEquals("en_US", infos.getLang());
}
Aggregations