zoukankan      html  css  js  c++  java
  • Shiro 登录页面的几个固定字段

    http://shiro.apache.org/webapp-tutorial.html

    Step 3b: Add a login page
    
    Since Step 3a enabled login and logout support, now we need to ensure there is actually a /login.jsp page to display a login form.
    
    The step3 branch contains a new src/main/webapp/login.jsp page. This is a simple enough bootstrap-themed HTML login page, but there are four important things in it:
    
    The form’s action value is the empty string. When a form does not have an action value, the browser will submit the form request to the same URL. This is fine, as we will tell Shiro what that URL is shortly so Shiro can automatically process any login submissions. The /login.jsp = authc line in shiro.ini is what tells the authc filter to process the submission.
    There is a username form field. The Shiro authc filter will automatically look for a username request parameter during login submission and use that as the value during login (many Realms allow this to be an email or a username).
    There is a password form field. The Shiro authc filter will automatically look for a password request parameter during login submission.
    There is a rememberMe checkbox whose ‘checked’ state can be a ‘truthy’ value (true, t, 1, enabled, y, yes, or on).
    Our login.jsp form just uses the default username, password, and rememberMe form field names. They naems are configurable if you wish to change them - see the FormAuthenticationFilter JavaDoc for information.
  • 相关阅读:
    导航栏下拉至一定高度后固定在顶部的特效
    laravel表单中文错误提示本地化
    laravel模板使用
    网站测试用例
    sublime安装ctags用于追踪函数
    ecshop头部添加所在城市
    php 常用的redis操作语法
    mysql where与 having的区别
    mysql 列类型以及属性特点
    不错的博客链接
  • 原文地址:https://www.cnblogs.com/zno2/p/5167376.html
Copyright © 2011-2022 走看看