三大框架学习java面试javaweb

2018-04-23 AuthorizingRealm用户认证以

2018-05-16  本文已影响1人  楼亭樵客

https://www.cnblogs.com/question-sky/p/6806419.html

//授权 protected AuthorizationInfo getAuthorizationInfo(PrincipalCollection principals) { if (principals == null) { return null; } AuthorizationInfo info = null; if (log.isTraceEnabled()) { log.trace("Retrieving AuthorizationInfo for principals [" + principals + "]"); } //是否引用cache Cache cache = getAvailableAuthorizationCache(); if (cache != null) { if (log.isTraceEnabled()) { log.trace("Attempting to retrieve the AuthorizationInfo from cache."); } Object key = getAuthorizationCacheKey(principals); info = cache.get(key); if (log.isTraceEnabled()) { if (info == null) { log.trace("No AuthorizationInfo found in cache for principals [" + principals + "]"); } else { log.trace("AuthorizationInfo found in cache for principals [" + principals + "]"); } } } if (info == null) { // Call template method if the info was not found in a cache //调用授权抽象方法,供子类实现 info = doGetAuthorizationInfo(principals); // If the info is not null and the cache has been created, then cache the authorization info. if (info != null && cache != null) { if (log.isTraceEnabled()) { log.trace("Caching authorization info for principals: [" + principals + "]."); } Object key = getAuthorizationCacheKey(principals); cache.put(key, info); } } return info; }

/ossmanager/api/** = anon

            /test/** = anon

            /login = captcha,authc

            /logout=logout

            /index = anon

            /jcaptcha.jpeg = anon

            /403.html = anon

            /login.html = anon

            /favicon.ico = anon

            /static/** = anon

            /index.html=user,sysUser

            /welcome.html=user,sysUser

            /admin/user/modifyPwd.html=user,sysUser

            /admin/user/updatePassword=user,sysUser

            /admin/user/role/list=user,sysUser

            /** = user,sysUser,perm

           

上一篇 下一篇

猜你喜欢

热点阅读