use of org.olat.login.oauth.model.OAuthUser in project openolat by klemens.
the class Google2Provider method parseInfos.
public OAuthUser parseInfos(String body) {
OAuthUser user = new OAuthUser();
try {
JSONObject obj = new JSONObject(body);
user.setId(getValue(obj, "id"));
user.setFirstName(getValue(obj, "given_name"));
user.setLastName(getValue(obj, "family_name"));
user.setLang(getValue(obj, "locale"));
} catch (JSONException e) {
log.error("", e);
}
return user;
}
Aggregations