use of oauth2.service.UserAccount in project tesb-rt-se by Talend.
the class ThirdPartyAccessService method getUserCalendar.
@GET
public Calendar getUserCalendar() {
OAuthContext oauth = getOAuthContext();
String userName = oauth.getSubject().getLogin();
UserAccount account = accounts.getAccount(userName);
if (account == null) {
account = accounts.getAccountWithAlias(userName);
}
return account.getCalendar();
}
Aggregations