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.
Shiro 登录页面的几个固定字段的更多相关文章
- 使用Shiro登录成功后,跳转到之前访问的页面实现
转:http://blog.csdn.net/lhacker/article/details/20450855 很多时候,我们需要做到,当用户登录成功后,跳转回登录前的页面.如果用户是点击" ...
- Shiro登录成功之后跳到指定URL
通常我们使用shiro,登录之后就会跳到我们上一次访问的URL,如果我们是直接访问登录页面的话,shiro就会根据我们配置的successUrl去重定向,如果我们没有配置successUrl的话,那么 ...
- asp.net+mvc+easyui+sqlite 简单用户系统学习之旅(三)—— 简单登录页面+sqlite+动软代码生成器的使用
上一节讲到利用easyui的layout.tree.tab和datagrid创建用户管理的页面,注意利用到easyui的页面一定要按顺序添加jQuery和easyUI的.js和.css样式,灵活查看e ...
- Swift - 自动布局库SnapKit的使用详解4(样例1:实现一个登录页面)
前面的几篇文章讲解了自动布局库SnapKit的使用方法.本文通过一个完整的样例(登录页面)来演示在实际项目中如何使用SnapKit来实现自动化布局的.1,效果图如下
- 单点登录CAS使用记(四):为登录页面加上验证码
CAS默认的登录页面样式如下,只有用户名与密码两项验证项目. 现在需要为首页登录加上验证码功能. 第一步:首页对默认登录页面的样式进行了调整,使其看上去还算美观. 在页面上加上了验证码项目. 第二步: ...
- 移动端登录页面input获取焦点后页面布局及输入框上移的问题
最近切微信页面的时候,发现移动端的登录页面,带输入框的那种,如图: 从页面本身来看没有什么问题,上传至测试服务器,用iphone访问也没有什么问题,但是当同事用Android手机获取焦点后,问题来了, ...
- spring boot(十四)shiro登录认证与权限管理
这篇文章我们来学习如何使用Spring Boot集成Apache Shiro.安全应该是互联网公司的一道生命线,几乎任何的公司都会涉及到这方面的需求.在Java领域一般有Spring Security ...
- vue实现未登录跳转到登录页面
环境:vue 2.9.3; webpack;vue-router 目的:实现未登录跳转 例子:直接在url地址栏输入...../home,但是这个页面要求需要登陆之后才能进入,判断的值就通过登陆之后给 ...
- 怎么测试一个web登录页面
在以前的面试和同事面试交流的过程中,有多次被问到:“给你一个登录页面,上面有2个textbox,一个提交按钮,你将怎么测试”?或问,请针对这个页面设计30个以上的test case. 此题的考察目的: ...
随机推荐
- python之函数的作用域
name = "wangyue" def test1(): name= "in the test1" def bar(): name = "zhaoz ...
- String类的intern()方法
0.引言 什么都先不说,先看下面这个引入的例子: String str1 = new String("SEU")+ new String("Calvin"); ...
- box2d 计算下一帧的位置/角度
var dt:Number=1/30; var y0:Number=_body.GetPosition().y; var y:Number=y0+_body.GetLinearVelocity().y ...
- docker registry2
https://blog.csdn.net/mideagroup/article/details/52052618
- jsp页面添加时间
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <body& ...
- DOS批处理前言
-----------made by siwuxie095 1.批处理(Batch):望文知义,对某对象进行批量处理,实际上是一种脚本 2.DOS(Disk Operating System-磁盘操作 ...
- models渲染字典&form表单上传文件&ajax上传文件
{# {% for u in teacher_d.keys %}#} {# {% for u in teacher_d.values %}#} {% for k,u in teacher_d.item ...
- 简述Markdown的使用方法
MarkdownPad Document Markdown的使用技巧 一.标题 一个”#“表示H1.“##”表示H2... 二.列表 第一点 第二点 注意1.2. -与文本之间要有一个空格 这一点 三 ...
- 【Spring】Spring boot多数据源历险记
一.问题描述 笔者根据需求在开发过程中,需要在原项目的基础上(单数据源),新增一个数据源C,根据C数据源来实现业务.至于为什么不新建一个项目,大概是因为这只是个小功能,访问量不大,不需要单独申请个服务 ...
- ecplice中去掉提示信息的步骤
Window-->preferences-->Java-->Editor-->Hovers-->将Combined Hover前面的对勾去掉-->ok.