All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alogic.auth.sso.server.ServerSideHandler Maven / Gradle / Ivy

package com.alogic.auth.sso.server;

import com.alogic.auth.Principal;
import com.alogic.auth.Session;
import com.alogic.auth.SessionPrincipal;
import com.alogic.auth.local.DefaultAuthenticationHandler;

/**
 * SSO服务端的Handler
 * 
 * @author yyduan
 * @version 1.6.11.1 [20171215 duanyy] 
* - 增加获取登录id的方法
* * @version 1.6.11.7 [20180107 duanyy]
* - 优化Session管理
* * @version 1.6.11.14 [duanyy 20180129]
* - 优化AuthenticationHandler接口
* * @version 1.6.11.22 [duanyy 20180314]
* - 增加isLocalLoginMode(是否本地登录模式)的判断
* - 增加common(扩展指令接口)
*/ public class ServerSideHandler extends DefaultAuthenticationHandler{ @Override public Principal getPrincipal(String app,String token,String callback) { Session session = this.sessionManager.getSession(token,false); return (session != null && session.isLoggedIn()) ? new SessionPrincipal(token,session):null; } @Override public boolean isLocalLoginMode(){ return true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy