use of com.jeesuite.security.model.UserSession in project jeesuite-libs by vakinge.
the class SecurityDelegating method createOauth2AccessToken.
public static AccessToken createOauth2AccessToken(AuthUser user) {
UserSession session = getCurrentSession();
session.setUser(user);
getInstance().sessionManager.storageLoginSession(session);
//
AccessToken accessToken = new AccessToken();
accessToken.setAccess_token(session.getSessionId());
accessToken.setRefresh_token(TokenGenerator.generate());
accessToken.setExpires_in(session.getExpiresIn());
return accessToken;
}
Aggregations