<shiro:authenticated>
用戶[<shiro:principal/>]已身份驗證通過
</shiro:authenticated>
2).notAuthenticated 標籤:用戶未進行身份驗證,即沒有調用Subject.login進行登錄,包括記住我自動登錄的也屬於未進行身份驗證。
<shiro:notAuthenticated>
身份未驗證(包括記住我)
</shiro:notAuthenticated>
3).pincipal 標籤:顯示用戶身份信息,默認調用Subject.getPrincipal()獲取,即Primary principal
<shiro:principal property="username"/>
4).hasRole 標籤:如果當前Subject有角色將顯示body體內容:
<shiro:hasRole name="admin">
用戶:[<shiro:principal>]擁有角色<br/>
</shiro:hasRole>
5).lacksRole:如果當前Subject沒有角色將顯示Body體內容
<shiro:lacksRole name="admin">
用戶[<shiro:principal/>]擁有權限user.create<br/>
</shiro:lacksRole>
6).hasPermission:如果當前Subject有權限將顯示body體內容
<shiro:hasPermission name="info:link:edit">
!!!
</shiro:hasPermission>