|
@@ -20,6 +20,7 @@ package org.hswebframework.web.authorization.container;
|
|
|
|
|
|
import org.hswebframework.web.authorization.Authentication;
|
|
|
|
|
|
+import javax.servlet.http.HttpSession;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -30,6 +31,14 @@ import java.util.List;
|
|
|
*/
|
|
|
public interface AuthenticationContainer {
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据sessionId获取权限信息
|
|
|
+ *
|
|
|
+ * @param sessionId
|
|
|
+ * @return 权限信息, 未授权时返回null
|
|
|
+ */
|
|
|
+ Authentication getAuthenticationBySessionId(String sessionId);
|
|
|
+
|
|
|
/**
|
|
|
* @param userId 用户ID
|
|
|
* @return 用户是否已经授权
|
|
@@ -58,5 +67,5 @@ public interface AuthenticationContainer {
|
|
|
* @param authentication
|
|
|
* @return 添加后被覆盖的权限信息 ,如果没有则返回null
|
|
|
*/
|
|
|
- Authentication addAuthentication(Authentication authentication);
|
|
|
+ Authentication addAuthentication(Authentication authentication, String sessionId);
|
|
|
}
|