美文网首页三大框架学习java面试javaweb
2018-04-23 AuthorizingRealm用户认证以

2018-04-23 AuthorizingRealm用户认证以

作者: 楼亭樵客 | 来源:发表于2018-05-16 09:26 被阅读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

               

    相关文章

      网友评论

        本文标题:2018-04-23 AuthorizingRealm用户认证以

        本文链接:https://www.haomeiwen.com/subject/apyklftx.html