锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产青草亚洲香蕉精品久久,亚洲日韩av无码,亚洲国产日韩精品http://www.tkk7.com/tomato2088/category/17990.htmlzh-cnWed, 28 Feb 2007 04:35:03 GMTWed, 28 Feb 2007 04:35:03 GMT60杞細Acegi瀹夊叏緋葷粺鐨勯厤緗?/title><link>http://www.tkk7.com/tomato2088/archive/2007/02/02/97642.html</link><dc:creator>瑗跨孩鏌匡紙tomato錛?/dc:creator><author>瑗跨孩鏌匡紙tomato錛?/author><pubDate>Fri, 02 Feb 2007 12:31:00 GMT</pubDate><guid>http://www.tkk7.com/tomato2088/archive/2007/02/02/97642.html</guid><wfw:comment>http://www.tkk7.com/tomato2088/comments/97642.html</wfw:comment><comments>http://www.tkk7.com/tomato2088/archive/2007/02/02/97642.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/tomato2088/comments/commentRss/97642.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/tomato2088/services/trackbacks/97642.html</trackback:ping><description><![CDATA[ <font color="#000080">聽Acegi瀹夊叏緋葷粺鐨勯厤緗?</font> <div id="soiqekm" class="postText"> <p>聽聽聽聽聽聽聽聽<br />Acegi 鐨勯厤緗湅璧鋒潵闈炲父澶嶆潅,浣嗕簨瀹炰笂鍦ㄥ疄闄呴」鐩殑瀹夊叏搴旂敤涓垜浠茍涓嶉渶瑕侀偅涔堝鍔熻兘,娓呮鐨勪簡瑙cegi閰嶇疆涓悇欏圭殑鍔熻兘錛屾湁鍔╀簬鎴戜滑鐏墊椿鐨勮繍鐢ˋcegi浜庡疄璺典腑銆?/p> </div> <p>2.1 鍦╓eb.xml涓殑閰嶇疆</p> <p>1)聽 <strong>FilterToBeanProxy</strong><br />銆銆Acegi閫氳繃瀹炵幇浜咶ilter鎺ュ彛鐨凢ilterToBeanProxy鎻愪緵涓縐嶇壒孌婄殑浣跨敤Servlet Filter鐨勬柟寮忥紝瀹冨鎵楽pring涓殑Bean -- FilterChainProxy鏉ュ畬鎴愯繃婊ゅ姛鑳斤紝榪欏ソ澶勬槸綆鍖栦簡web.xml鐨勯厤緗紝騫朵笖鍏呭垎鍒╃敤浜哠pring IOC鐨勪紭鍔褲侳ilterChainProxy鍖呭惈浜嗗鐞嗚璇佽繃紼嬬殑filter鍒楄〃錛屾瘡涓猣ilter閮芥湁鍚勮嚜鐨勫姛鑳姐?/p> <pre>聽 聽 <filter><br />聽聽聽聽聽聽聽 <filter-name>Acegi Filter Chain Proxy</filter-name><br />聽聽聽聽聽聽聽 <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class><br />聽聽聽聽聽聽聽 <init-param><br />聽聽聽聽聽聽聽聽聽聽聽 <param-name>targetClass</param-name><br />聽聽聽聽聽聽聽聽聽聽聽 <param-value>org.acegisecurity.util.FilterChainProxy</param-value><br />聽聽聽聽聽聽聽 </init-param><br />聽聽聽 </filter></pre> <p>2) <strong>filter-mapping</strong><br />銆銆<filter-mapping>闄愬畾浜咶ilterToBeanProxy鐨刄RL鍖歸厤妯″紡,鍙湁*.do鍜?.jsp鍜?j_acegi_security_check 鐨勮姹傛墠浼氬彈鍒版潈闄愭帶鍒訛紝瀵筳avascript,css絳変笉闄愬埗銆?/p> <pre>聽聽 <filter-mapping><br />聽聽聽聽聽 <filter-name>Acegi Filter Chain Proxy</filter-name><br />聽聽聽聽聽 <url-pattern>*.do</url-pattern><br />聽聽聽 </filter-mapping><br />聽聽聽 <br />聽聽聽 <filter-mapping><br />聽聽聽聽聽 <filter-name>Acegi Filter Chain Proxy</filter-name><br />聽聽聽聽聽 <url-pattern>*.jsp</url-pattern><br />聽聽聽 </filter-mapping><br />聽聽聽 <br />聽聽聽 <filter-mapping><br />聽聽聽聽聽 <filter-name>Acegi Filter Chain Proxy</filter-name><br />聽聽聽聽聽 <url-pattern>/j_acegi_security_check</url-pattern><br /> </filter-mapping></pre> <p>3) <strong>HttpSessionEventPublisher</strong><br />銆銆<listener>鐨凥ttpSessionEventPublisher鐢ㄤ簬鍙戝竷HttpSessionApplicationEvents鍜孒ttpSessionDestroyedEvent浜嬩歡緇檚pring鐨刟pplicationcontext銆?/p> <pre>聽聽聽 <listener><br />聽聽聽聽聽聽聽 <listener-class>org.acegisecurity.ui.session.HttpSessionEventPublisher</listener-class><br />聽聽聽 </listener><br /></pre> <h2> <br />2.2 鍦╝pplicationContext-acegi-security.xml涓?/h2> <h3>2.2.1 FILTER CHAIN</h3> <p>銆銆FilterChainProxy浼氭寜欏哄簭鏉ヨ皟鐢ㄨ繖浜沠ilter,浣胯繖浜沠ilter鑳戒韓鐢⊿pring ioc鐨勫姛鑳? CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON瀹氫箟浜唘rl姣旇緝鍓嶅厛杞負灝忓啓錛?PATTERN_TYPE_APACHE_ANT瀹氫箟浜嗕嬌鐢ˋpache ant鐨勫尮閰嶆ā寮?</p> <pre> <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"><br />聽聽聽聽聽聽聽 <property name="filterInvocationDefinitionSource"><br />聽聽聽聽聽聽聽聽聽聽聽 <value><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 PATTERN_TYPE_APACHE_ANT<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽 /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,<br />basicProcessingFilter,rememberMeProcessingFilter,anonymousProcessingFilter,<br /> exceptionTranslationFilter,filterInvocationInterceptor<br />聽聽聽聽聽聽聽聽聽聽聽 </value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽 </bean></pre> <h3>2.2.2 鍩虹璁よ瘉</h3> <p>1) <strong>authenticationManager</strong><br />銆銆璧峰埌璁よ瘉綆$悊鐨勪綔鐢紝瀹冨皢楠岃瘉鐨勫姛鑳藉鎵樼粰澶氫釜Provider錛屽茍閫氳繃閬嶅巻Providers, 浠ヤ繚璇佽幏鍙栦笉鍚屾潵婧愮殑韜喚璁よ瘉錛岃嫢鏌愪釜Provider鑳芥垚鍔熺‘璁ゅ綋鍓嶇敤鎴風殑韜喚錛宎uthenticate()鏂規硶浼氳繑鍥炰竴涓畬鏁寸殑鍖呭惈鐢ㄦ埛鎺堟潈淇℃伅鐨凙uthentication瀵硅薄錛屽惁鍒欎細鎶涘嚭涓涓狝uthenticationException銆?br />Acegi鎻愪緵浜嗕笉鍚岀殑AuthenticationProvider鐨勫疄鐜?濡傦細<br />聽聽聽聽聽聽聽 DaoAuthenticationProvider 浠庢暟鎹簱涓鍙栫敤鎴蜂俊鎭獙璇佽韓浠?br />聽聽聽聽聽聽聽 AnonymousAuthenticationProvider 鍖垮悕鐢ㄦ埛韜喚璁よ瘉<br />聽聽聽聽聽聽聽 RememberMeAuthenticationProvider 宸插瓨cookie涓殑鐢ㄦ埛淇℃伅韜喚璁よ瘉<br />聽聽聽聽聽聽聽 AuthByAdapterProvider 浣跨敤瀹瑰櫒鐨勯傞厤鍣ㄩ獙璇佽韓浠?br />聽聽聽聽聽聽聽 CasAuthenticationProvider 鏍規嵁Yale涓績璁よ瘉鏈嶅姟楠岃瘉韜喚, 鐢ㄤ簬瀹炵幇鍗曠偣鐧婚檰<br />聽聽聽聽聽聽聽 JaasAuthenticationProvider 浠嶫ASS鐧婚檰閰嶇疆涓幏鍙栫敤鎴蜂俊鎭獙璇佽韓浠?br />聽聽聽聽聽聽聽 RemoteAuthenticationProvider 鏍規嵁榪滅▼鏈嶅姟楠岃瘉鐢ㄦ埛韜喚<br />聽聽聽聽聽聽聽 RunAsImplAuthenticationProvider 瀵硅韓浠藉凡琚鐞嗗櫒鏇挎崲鐨勭敤鎴瘋繘琛岄獙璇?br />聽聽聽聽聽聽聽 X509AuthenticationProvider 浠嶺509璁よ瘉涓幏鍙栫敤鎴蜂俊鎭獙璇佽韓浠?br />聽聽聽聽聽聽聽 TestingAuthenticationProvider 鍗曞厓嫻嬭瘯鏃朵嬌鐢?/p> <p>聽聽聽聽聽聽聽 姣忎釜璁よ瘉鑰呬細瀵硅嚜宸辨寚瀹氱殑璇佹槑淇℃伅榪涜璁よ瘉錛屽DaoAuthenticationProvider浠呭UsernamePasswordAuthenticationToken榪欎釜璇佹槑淇℃伅榪涜璁よ瘉銆?/p> <pre><bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager"><br />聽聽聽聽聽聽聽 <property name="providers"><br />聽聽聽聽聽聽聽聽聽聽聽 <list><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <ref local="daoAuthenticationProvider"/><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <ref local="anonymousAuthenticationProvider"/><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <ref local="rememberMeAuthenticationProvider"/><br />聽聽聽聽聽聽聽聽聽聽聽 </list><br />聽聽聽聽聽聽聽 </property><br /></bean></pre> <p> <br />2) <strong>daoAuthenticationProvider</strong><br />銆銆榪涜綆鍗曠殑鍩轟簬鏁版嵁搴撶殑韜喚楠岃瘉銆侱aoAuthenticationProvider鑾峰彇鏁版嵁搴撲腑鐨勮處鍙峰瘑鐮佸茍榪涜鍖歸厤錛岃嫢鎴愬姛鍒欏湪閫氳繃鐢ㄦ埛韜喚鐨勫悓鏃惰繑鍥炰竴涓寘鍚巿鏉冧俊鎭殑Authentication瀵硅薄錛屽惁鍒欒韓浠介獙璇佸け璐ワ紝鎶涘嚭涓涓狝uthenticatiionException銆?/p> <pre>聽聽聽 <bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"><br />聽聽聽聽聽聽聽 <property name="userDetailsService" ref="jdbcDaoImpl"/><br />聽聽聽聽聽聽聽 <property name="userCache" ref="userCache"/><br />聽聽聽聽聽聽聽 <property name="passwordEncoder" ref="passwordEncoder"/><br />聽聽 </bean></pre> <p> <br />3) <strong>passwordEncoder</strong><br />銆銆浣跨敤鍔犲瘑鍣ㄥ鐢ㄦ埛杈撳叆鐨勬槑鏂囪繘琛屽姞瀵嗐侫cegi鎻愪緵浜嗕笁縐嶅姞瀵嗗櫒:<br />PlaintextPasswordEncoder鈥旈粯璁わ紝涓嶅姞瀵嗭紝榪斿洖鏄庢枃.<br />ShaPasswordEncoder鈥斿搱甯岀畻娉?SHA)鍔犲瘑<br />Md5PasswordEncoder鈥旀秷鎭憳瑕?MD5)鍔犲瘑</p> <pre><bean id="passwordEncoder" class="org.acegisecurity.providers.encoding.Md5PasswordEncoder"/></pre> <p> <br />4) <strong>jdbcDaoImpl</strong><br />銆銆鐢ㄤ簬鍦ㄦ暟鎹腑鑾峰彇鐢ㄦ埛淇℃伅銆?acegi鎻愪緵浜嗙敤鎴峰強鎺堟潈鐨勮〃緇撴瀯錛屼絾鏄偍涔熷彲浠ヨ嚜宸辨潵瀹炵幇銆傞氳繃usersByUsernameQuery榪欎釜SQL寰楀埌浣犵殑(鐢ㄦ埛ID,瀵嗙爜,鐘舵佷俊鎭?;閫氳繃authoritiesByUsernameQuery榪欎釜SQL寰楀埌浣犵殑(鐢ㄦ埛ID,鎺堟潈淇℃伅)</p> <pre> <bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl"><br />聽聽聽聽聽聽聽 <property name="dataSource" ref="dataSource"/><br />聽聽聽聽聽聽聽 <property name="usersByUsernameQuery"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>select loginid,passwd,1 from users where loginid = ?</value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽聽聽聽聽 <property name="authoritiesByUsernameQuery"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>select u.loginid,p.name from users u,roles r,permissions p,user_role ur,role_permis rp where u.id=ur.user_id and r.id=ur.role_id and p.id=rp.permis_id and<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 r.id=rp.role_id and p.status='1' and u.loginid=?</value><br />聽聽聽聽聽聽聽 </property><br /></bean></pre> <p>5) <strong>userCache銆&聽 resourceCache</strong><br />銆銆緙撳瓨鐢ㄦ埛鍜岃祫婧愮浉瀵瑰簲鐨勬潈闄愪俊鎭傛瘡褰撹姹備竴涓彈淇濇姢璧勬簮鏃訛紝daoAuthenticationProvider灝變細琚皟鐢ㄤ互鑾峰彇鐢ㄦ埛鎺堟潈淇℃伅銆傚鏋滄瘡嬈¢兘浠庢暟鎹簱鑾峰彇鐨勮瘽錛岄偅浠d環寰堥珮錛屽浜庝笉甯告敼鍙樼殑鐢ㄦ埛鍜岃祫婧愪俊鎭潵璇達紝鏈濂芥槸鎶婄浉鍏蟲巿鏉冧俊鎭紦瀛樿搗鏉ャ?璇﹁ <a >2.6.3 璧勬簮鏉冮檺瀹氫箟鎵╁睍</a> )<br />userCache鎻愪緵浜嗕袱縐嶅疄鐜? NullUserCache鍜孍hCacheBasedUserCache, NullUserCache瀹為檯涓婂氨鏄笉榪涜浠諱綍緙撳瓨錛孍hCacheBasedUserCache鏄嬌鐢‥hcache鏉ュ疄鐜扮紦鍔熻兘銆?/p> <pre>聽聽聽 <bean id="userCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean"><br />聽聽聽聽聽聽聽 <property name="cacheManager" ref="cacheManager"/><br />聽聽聽聽聽聽聽 <property name="cacheName" value="userCache"/><br />聽聽聽 </bean><br />聽聽聽 <bean id="userCache" class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache" autowire="byName"><br />聽聽聽聽聽聽聽 <property name="cache" ref="userCacheBackend"/><br /> 聽聽聽 </bean><br />聽聽聽 <bean id="resourceCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean"><br />聽聽聽聽聽聽聽 <property name="cacheManager" ref="cacheManager"/><br />聽聽聽聽聽聽聽 <property name="cacheName" value="resourceCache"/><br />聽聽聽 </bean><br />聽聽聽 <bean id="resourceCache" class="org.springside.modules.security.service.acegi.cache.ResourceCache" autowire="byName"><br />聽聽聽聽聽聽聽 <property name="cache" ref="resourceCacheBackend"/><br />聽聽聽 </bean></pre> <p> <br />6) <strong>basicProcessingFilter</strong><br />銆銆鐢ㄤ簬澶勭悊HTTP澶寸殑璁よ瘉淇℃伅錛屽浠嶴pring榪滅▼鍗忚(濡侶essian鍜孊urlap)鎴栨櫘閫氱殑嫻忚鍣ㄥIE,Navigator鐨凥TTP澶翠腑鑾峰彇鐢ㄦ埛淇℃伅錛屽皢浠栦滑杞氦緇欓氳繃authenticationManager灞炴ц閰嶇殑璁よ瘉綆$悊鍣ㄣ傚鏋滆璇佹垚鍔燂紝浼氬皢涓涓狝uthentication瀵硅薄鏀懼埌浼氳瘽涓紝鍚﹀垯錛屽鏋滆璇佸け璐ワ紝浼氬皢鎺у埗杞氦緇欒璇佸叆鍙g偣(閫氳繃authenticationEntryPoint灞炴ц閰?</p> <pre>聽聽聽 <bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter"><br />聽聽聽聽聽聽聽 <property name="authenticationManager" ref="authenticationManager"/><br />聽聽聽聽聽聽聽 <property name="authenticationEntryPoint" ref="basicProcessingFilterEntryPoint"/><br />聽聽聽 </bean></pre> <p>7) <strong>basicProcessingFilterEntryPoint</strong><br />銆銆閫氳繃鍚戞祻瑙堝櫒鍙戦佷竴涓狧TTP401(鏈巿鏉?娑堟伅錛屾彁紺虹敤鎴風櫥褰曘?br />澶勭悊鍩轟簬HTTP鐨勬巿鏉冭繃紼嬶紝 鍦ㄥ綋楠岃瘉榪囩▼鍑虹幇寮傚父鍚庣殑"鍘誨悜"錛岄氬父瀹炵幇杞悜銆佸湪response閲屽姞鍏rror淇℃伅絳夊姛鑳姐?/p> <pre> <bean id="basicProcessingFilterEntryPoint" class="org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint"><br />聽聽聽聽聽聽聽 <property name="realmName" value="SpringSide Realm"/><br /></bean></pre> <p>8) <strong>authenticationProcessingFilterEntryPoint</strong><br />銆銆褰撴姏鍑篈ccessDeniedException鏃訛紝灝嗙敤鎴烽噸瀹氬悜鍒扮櫥褰曠晫闈€傚睘鎬oginFormUrl閰嶇疆浜嗕竴涓櫥褰曡〃鍗曠殑URL,褰撻渶瑕佺敤鎴風櫥褰曟椂錛宎uthenticationProcessingFilterEntryPoint浼氬皢鐢ㄦ埛閲嶅畾鍚戝埌璇RL</p> <pre> <bean id="authenticationProcessingFilterEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"><br />聽聽聽聽聽聽聽 <property name="loginFormUrl"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>/security/login.jsp</value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽聽聽聽聽 <property name="forceHttps" value="false"/><br /></bean></pre> <h2>2.2.3 HTTP瀹夊叏璇鋒眰</h2> <p>1) <strong>httpSessionContextIntegrationFilter</strong><br />銆銆姣忔request鍓?HttpSessionContextIntegrationFilter浠嶴ession涓幏鍙朅uthentication瀵硅薄錛屽湪request瀹屽悗, 鍙堟妸Authentication瀵硅薄淇濆瓨鍒癝ession涓緵涓嬫request浣跨敤,姝ilter蹇呴』鍏朵粬Acegi filter鍓嶄嬌鐢紝浣夸箣鑳借法瓚婂涓姹傘?/p> <pre><bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"></bean><br />聽聽聽 <bean id="httpRequestAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased"><br />聽聽聽聽聽聽聽 <property name="allowIfAllAbstainDecisions" value="false"/><br />聽聽聽聽聽聽聽 <property name="decisionVoters"><br />聽聽聽聽聽聽聽聽聽聽聽 <list><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <ref bean="roleVoter"/><br />聽聽聽聽聽聽聽聽聽聽聽 </list><br />聽聽聽聽聽聽聽 </property><br /></bean></pre> <p> <br />2) <strong>httpRequestAccessDecisionManager</strong><br />銆銆緇忚繃鎶曠エ鏈哄埗鏉ュ喅瀹氭槸鍚﹀彲浠ヨ闂煇涓璧勬簮(URL鎴栨柟娉?銆俛llowIfAllAbstainDecisions涓篺alse鏃跺鏋滄湁涓涓垨浠ヤ笂鐨刣ecisionVoters鎶曠エ閫氳繃,鍒欐巿鏉冮氳繃銆傚彲閫夌殑鍐崇瓥鏈哄埗鏈塁onsensusBased鍜孶nanimousBased</p> <pre>聽聽聽 <bean id="httpRequestAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased"><br />聽聽聽聽聽聽聽 <property name="allowIfAllAbstainDecisions" value="false"/><br />聽聽聽聽聽聽聽 <property name="decisionVoters"><br />聽聽聽聽聽聽聽聽聽聽聽 <list><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <ref bean="roleVoter"/><br />聽聽聽聽聽聽聽聽聽聽聽 </list><br />聽聽聽聽聽聽聽 </property><br />聽聽聽 </bean></pre> <p> <br />3) <strong>roleVoter</strong><br />聽銆銆蹇呴』鏄互rolePrefix璁懼畾鐨剉alue寮澶寸殑鏉冮檺鎵嶈兘榪涜鎶曠エ,濡侫UTH_ , ROLE_</p> <pre>聽聽聽 <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"><br />聽聽聽聽聽聽聽 <property name="rolePrefix" value="AUTH_"/><br />聽聽 </bean></pre> <p>4錛?strong>exceptionTranslationFilter</strong><br />銆銆寮傚父杞崲榪囨護鍣紝涓昏鏄鐞咥ccessDeniedException鍜孉uthenticationException錛屽皢緇欐瘡涓紓甯告壘鍒板悎閫傜殑"鍘誨悜"聽</p> <pre>聽聽 <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter"><br />聽聽聽聽聽聽聽 <property name="authenticationEntryPoint" ref="authenticationProcessingFilterEntryPoint"/><br />聽聽聽 </bean></pre> <p>5) <strong>authenticationProcessingFilter</strong><br />銆銆鍜宻ervlet spec宸笉澶?澶勭悊鐧婚檰璇鋒眰.褰撹韓浠介獙璇佹垚鍔熸椂錛孉uthenticationProcessingFilter浼氬湪浼氳瘽涓斁緗竴涓狝uthentication瀵硅薄錛屽茍涓旈噸瀹氬悜鍒扮櫥褰曟垚鍔熼〉闈?br />聽聽聽聽聽聽聽聽 authenticationFailureUrl瀹氫箟鐧婚檰澶辮觸鏃惰漿鍚戠殑欏甸潰<br />聽聽聽聽聽聽聽聽 defaultTargetUrl瀹氫箟鐧婚檰鎴愬姛鏃惰漿鍚戠殑欏甸潰<br />聽聽聽聽聽聽聽聽 filterProcessesUrl瀹氫箟鐧婚檰璇鋒眰鐨勯〉闈?br />聽聽聽聽聽聽聽聽 rememberMeServices鐢ㄤ簬鍦ㄩ獙璇佹垚鍔熷悗娣誨姞cookie淇℃伅</p> <pre>聽聽聽 <bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"><br />聽聽聽聽聽聽聽 <property name="authenticationManager" ref="authenticationManager"/><br />聽聽聽聽聽聽聽 <property name="authenticationFailureUrl"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>/security/login.jsp?login_error=1</value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽聽聽聽聽 <property name="defaultTargetUrl"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>/admin/index.jsp</value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽聽聽聽聽 <property name="filterProcessesUrl"><br />聽聽聽聽聽聽聽聽聽聽聽 <value>/j_acegi_security_check</value><br />聽聽聽聽聽聽聽 </property><br />聽聽聽聽聽聽聽 <property name="rememberMeServices" ref="rememberMeServices"/><br />聽聽聽 </bean></pre> <p>6) <strong>filterInvocationInterceptor</strong><br />銆銆鍦ㄦ墽琛岃漿鍚憉rl鍓嶆鏌bjectDefinitionSource涓瀹氱殑鐢ㄦ埛鏉冮檺淇℃伅銆傞鍏堬紝objectDefinitionSource涓畾涔変簡璁塊棶URL闇瑕佺殑灞炴т俊鎭?榪欓噷鐨勫睘鎬т俊鎭粎浠呮槸鏍囧織錛屽憡璇塧ccessDecisionManager瑕佺敤鍝簺voter鏉ユ姇紲?銆傜劧鍚庯紝authenticationManager鎺夌敤鑷繁鐨刾rovider鏉ュ鐢ㄦ埛鐨勮璇佷俊鎭繘琛屾牎楠屻傛渶鍚庯紝鏈夋姇紲ㄨ呮牴鎹敤鎴鋒寔鏈夎璇佸拰璁塊棶url闇瑕佺殑灞炴э紝璋冪敤鑷繁鐨剉oter鏉ユ姇紲紝鍐沖畾鏄惁鍏佽璁塊棶銆?/p> <pre>聽聽聽 <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"><br />聽聽聽聽聽聽聽 <property name="authenticationManager" ref="authenticationManager"/><br />聽聽聽聽聽聽聽 <property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/><br />聽聽聽聽聽聽聽 <property name="objectDefinitionSource" ref="filterDefinitionSource"/><br />聽聽聽 </bean></pre> <p> <br />7) <strong>filterDefinitionSource </strong>(璇﹁ <a >2.6.3 璧勬簮鏉冮檺瀹氫箟鎵╁睍</a>)<br />銆銆鑷畾涔塂BFilterInvocationDefinitionSource浠庢暟鎹簱鍜宑ache涓鍙栦繚鎶よ祫婧愬強鍏墮渶瑕佺殑璁塊棶鏉冮檺淇℃伅聽</p> <pre><bean id="filterDefinitionSource" class="org.springside.modules.security.service.acegi.DBFilterInvocationDefinitionSource"><br />聽聽聽聽聽聽聽 <property name="convertUrlToLowercaseBeforeComparison" value="true"/><br />聽聽聽聽聽聽聽 <property name="useAntPath" value="true"/><br />聽聽聽聽聽聽聽 <property name="acegiCacheManager" ref="acegiCacheManager"/><br /></bean></pre> <h2>2.2.4 鏂規硶璋冪敤瀹夊叏鎺у埗</h2> <p>(璇﹁ <a >2.6.3 璧勬簮鏉冮檺瀹氫箟鎵╁睍</a>)</p> <p>1) methodSecurityInterceptor<br />銆銆鍦ㄦ墽琛屾柟娉曞墠榪涜鎷︽埅錛屾鏌ョ敤鎴鋒潈闄愪俊鎭?br />2) methodDefinitionSource<br />銆銆鑷畾涔塎ethodDefinitionSource浠巆ache涓鍙栨潈闄?/p> <pre>聽聽 <bean id="methodSecurityInterceptor" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"><br />聽聽聽聽聽聽聽 <property name="authenticationManager" ref="authenticationManager"/><br />聽聽聽聽聽聽聽 <property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/><br />聽聽聽聽聽聽聽 <property name="objectDefinitionSource" ref="methodDefinitionSource"/><br />聽聽聽 </bean><br />聽聽聽 <bean id="methodDefinitionSource" class="org.springside.modules.security.service.acegi.DBMethodDefinitionSource"><br />聽聽聽聽聽聽聽 <property name="acegiCacheManager" ref="acegiCacheManager"/><br />聽聽聽 </bean></pre> <h2>2.3 Jcaptcha楠岃瘉鐮?/h2> <p>閲囩敤 <a >http://jcaptcha.sourceforge.net</a>聽浣滀負閫氱敤鐨勯獙璇佺爜鏂規錛岃鍙傝僑pringSide涓殑渚嬪瓙錛屾垨緗戜笂鐨勶細<br /><a >http://www.coachthrasher.com/page/blog?entry=jcaptcha_with_appfuse</a>銆?/p> <p>宸矙鍦ㄦ榪囩▼涓張鍙戠幇acegi logout filter鐨勯敊璇紝榪涜浜嗕慨姝c?/p> <p>鍙﹀瀹冮粯璁ゆ彁渚涚殑鍥劇墖姣旇緝闅捐錛屾垜浠琧ustom浜嗕竴涓編瑙備竴鐐圭殑鐗堟湰銆?/p> <img src ="http://www.tkk7.com/tomato2088/aggbug/97642.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/tomato2088/" target="_blank">瑗跨孩鏌匡紙tomato錛?/a> 2007-02-02 20:31 <a href="http://www.tkk7.com/tomato2088/archive/2007/02/02/97642.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞細CAS鍙婂鎴風Acegi鐨勫畨瑁呴厤緗寚鍗?http://www.tkk7.com/tomato2088/archive/2007/02/02/97639.html瑗跨孩鏌匡紙tomato錛?/dc:creator>瑗跨孩鏌匡紙tomato錛?/author>Fri, 02 Feb 2007 12:28:00 GMThttp://www.tkk7.com/tomato2088/archive/2007/02/02/97639.htmlhttp://www.tkk7.com/tomato2088/comments/97639.htmlhttp://www.tkk7.com/tomato2088/archive/2007/02/02/97639.html#Feedback0http://www.tkk7.com/tomato2088/comments/commentRss/97639.htmlhttp://www.tkk7.com/tomato2088/services/trackbacks/97639.html闃呰鍏ㄦ枃

]]>
Acegi1.0.3 + Spring2.0.1 + Hibernate3.2 綺捐ВDemo http://www.tkk7.com/tomato2088/archive/2006/12/11/86862.html瑗跨孩鏌匡紙tomato錛?/dc:creator>瑗跨孩鏌匡紙tomato錛?/author>Mon, 11 Dec 2006 04:21:00 GMThttp://www.tkk7.com/tomato2088/archive/2006/12/11/86862.htmlhttp://www.tkk7.com/tomato2088/comments/86862.htmlhttp://www.tkk7.com/tomato2088/archive/2006/12/11/86862.html#Feedback3http://www.tkk7.com/tomato2088/comments/commentRss/86862.htmlhttp://www.tkk7.com/tomato2088/services/trackbacks/86862.htmlAcegi1.0.3 浣跨敤鐨勬槸Spring1.2.8
鏈漢緇忚繃瀵笰cegi1.0.3 鐨勬簮浠g爜榪涜鍒犻夛紝騫跺紩鍏ュ埌Spring2.0.1鐜涓嬶紝鍋氫簡涓ユ牸鐨勬祴璇曘?br />
鏈琩emo 灝辨槸 鍦?Spring2.0.1 + Hibernate3.2 鐜涓嬶紝閽堝瑙嗗浘灞備嬌鐢?Struts 鍜?JSF 鍒嗗埆榪涜浜嗛泦鎴愶紝綆鍗曢矞鏄庢弿榪板浣曚嬌鐢?Acegi1.0.3 榪涜鍩轟簬鐢ㄦ埛瑙掕壊鐨勫姩鎬佹巿鏉冨畨鍏ㄦ帶鍒躲?/p>

鏈琩emo鏃㈤傚悎浜嶫SF + Spring2.0.1 + Hibernate3.2 欏圭洰涔熼傚悎浜嶴truts + Spring2.0.1 + Hibernate3.2欏圭洰錛?br />
鏈垪鍏ョ壒鍒鏄庢病鏈夋巿鏉冪殑浼佷笟鍜屼釜浜洪兘鍙互鑷敱鍏嶈垂涓嬭澆浣跨敤鎻愪緵瀹濊吹鎰忚錛?br />
鏈漢涓嶆ュ姛榪戝埄錛屾鍦ㄥ仛瀹屾暣鐨勬枃妗g紪鍐欙紝鍋氭渶鍚庝弗鏍肩殑嫻嬭瘯錛岃繎鏈熷湪姝ゅ厤璐瑰彂甯冿紝鏁鍏蟲敞錛?/p>

]]>
Acegi錛媓ibernate 鍔ㄦ佸疄鐜板熀浜庤鑹茬殑鏉冮檺綆$悊http://www.tkk7.com/tomato2088/archive/2006/12/03/85190.html瑗跨孩鏌匡紙tomato錛?/dc:creator>瑗跨孩鏌匡紙tomato錛?/author>Sun, 03 Dec 2006 08:04:00 GMThttp://www.tkk7.com/tomato2088/archive/2006/12/03/85190.htmlhttp://www.tkk7.com/tomato2088/comments/85190.htmlhttp://www.tkk7.com/tomato2088/archive/2006/12/03/85190.html#Feedback1http://www.tkk7.com/tomato2088/comments/commentRss/85190.htmlhttp://www.tkk7.com/tomato2088/services/trackbacks/85190.html闃呰鍏ㄦ枃

]]>
主站蜘蛛池模板: 国产高清对白在线观看免费91| 亚洲AV色吊丝无码| 麻豆一区二区三区蜜桃免费| 免费看AV毛片一区二区三区| 亚洲中文字幕无码一去台湾| 韩国免费一级成人毛片| 亚洲中文字幕无码中文字| 一个人看的www在线观看免费| 亚洲国产理论片在线播放| 亚洲精品在线免费看| 91亚洲视频在线观看| 99热在线精品免费全部my| 亚洲AV成人一区二区三区在线看| 成人毛片18女人毛片免费视频未| 久久乐国产综合亚洲精品| 永久免费视频v片www| 一个人看的www视频免费在线观看| 亚洲人成网77777色在线播放| 国产一区二区三区免费| 噜噜噜亚洲色成人网站∨| 在人线av无码免费高潮喷水| 亚洲日韩精品A∨片无码加勒比| 日韩电影免费在线| 无码人妻一区二区三区免费视频| ZZIJZZIJ亚洲日本少妇JIZJIZ| 99久久国产精品免费一区二区| 亚洲精品456在线播放| 成人免费777777| 一区在线免费观看| 亚洲国产精品第一区二区| 色婷婷7777免费视频在线观看| 亚洲AV无码一区二区三区鸳鸯影院| 亚洲av再在线观看| 日本高清不卡aⅴ免费网站| 亚洲成a人片77777群色| 在线免费观看韩国a视频| a级毛片在线免费观看| 亚洲一区二区三区高清不卡| 亚洲国产精品一区二区第一页免| 午夜精品免费在线观看| 国产精品亚洲va在线观看|