Spring Security Authorized Accessdecisionmanager

Source: Internet
Author: User
Tags object object

Spring Security Authorized Accessdecisionmanager Blog Category:
    • Security
    • Spring
In the previous blog there is a configuration:
XML code
  1. <http auto-config="false" disable-url-rewriting="true" use-expressions="true" entry-point-ref="Dtauth"
  2. create-session="never">
  3. <!--<session-management session-authentication-strategy-ref= "dtsession"/> --
  4. <intercept-url pattern="/unread/get" access="isauthenticated ()"/>
  5. <intercept-url pattern="/authtest.xhtm" access="Hasrole (' working ')"/>
  6. <intercept-url pattern="/authtest1.xhtm" access="hasrole (' trac ')"/>
  7. <intercept-url pattern="/cmmt/uc" access="isauthenticated ()"/>
  8. <intercept-url pattern="/favicon.ico" access="Denyall"/>
  9. <intercept-url pattern="/**" access="Permitall"/>
  10. <custom-filter position="Pre_auth_filter" ref="dtsessionmgr"/>
  11. </http>


Pattern means that url,access represents the permission for a URL, but where does this isauthenticated () be executed exactly? The original spring provides an authorization mechanism, which is implemented by the Org.springframework.security.access.AccessDecisionManager interface.

This interface defines this method:
Java code
    1. Void decide (authentication authentication, Object object, Collection<configattribute> configattributes)
    2. throws Accessdeniedexception, insufficientauthenticationexception;


Corresponds to the above configuration: object is Url,configattributes is an access. The common implementation class is affirmativebased

Spring Security Authorized Accessdecisionmanager

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.