use of com.diboot.iam.dto.SSOCredential in project diboot by dibo-software.
the class SSOAuthServiceImpl method initBaseJwtAuthToken.
/**
* 初始化JwtAuthToken实例
* @param credential
* @return
*/
private BaseJwtAuthToken initBaseJwtAuthToken(AuthCredential credential) {
// 通过CAS得到账号
SSOCredential ssoCredential = (SSOCredential) credential;
BaseJwtAuthToken token = new BaseJwtAuthToken(getAuthType(), ssoCredential.getUserTypeClass());
String username = parseCasTicket(ssoCredential);
ssoCredential.setAuthAccount(username);
// 设置账号密码
token.setAuthAccount(ssoCredential.getAuthAccount());
token.setTenantId(credential.getTenantId());
token.setRememberMe(ssoCredential.isRememberMe());
// 生成token
return token.generateAuthtoken(getExpiresInMinutes());
}
Aggregations