use of org.wso2.micro.gateway.tests.common.model.ApplicationDTO in project identity-api-user by wso2.
the class UserSessionToExternal method apply.
@Override
public SessionDTO apply(UserSession userSession) {
List<ApplicationDTO> appDTOs = userSession.getApplications().stream().map(new ApplicationToExternal()).collect(Collectors.toList());
SessionDTO session = new SessionDTO();
session.setApplications(appDTOs);
session.setIp(userSession.getIp());
session.setLastAccessTime(userSession.getLastAccessTime());
session.setLoginTime(userSession.getLoginTime());
session.setUserAgent(userSession.getUserAgent());
session.setId(userSession.getSessionId());
return session;
}
Aggregations