Userid for authorization, instead of Role and few more questions
I have few questions, if you can answer any would be great help
- I have configured LDAP to do authentication, and i am able to load the roles and authorize pattern by ROLES, i would like to know if i can add ROLES and user id for authorization for example, in below code /displayMyData will be available for all users in ROLE ROLE_ROLEADMINS, but i would like to make it available for a particular user id MYUSERID, so i dont want him to add to this ROLE, but give access to only 1 function, is it possible to do so, and if yes HOW?
HTML Code:
<http use-expressions="true">
<intercept-url pattern="/" access="isAuthenticated()" />
<intercept-url pattern="/displayMyData" access="hasRole('ROLE_ROLEADMINS')" />
<form-login />
</http>
- Can I get all the roles from a database table, instead of hard coding them in XML file
- I can print user name on JSP page using tag <security:authentication property="principal.username"/>
Is there any tag to print all the roles on JSP page for the logged in user for testing purpose
- How can i access LDAP context and user id in controller class so i read more properties or do some function after user logs in,
- Does logout invalidate session?