接着上一次结束的地方 WEB-INF/login-webflow.xml
<view-state id="viewLoginForm" view="casLoginView" model="credentials">
<binder>
<binding property="username" />
<binding property="password" />
</binder>
<on-entry>
<set name="viewScope.commandName" value="'credentials'" />
</on-entry>
<!--流程跑到这里开始,执行 AuthenticationViaFormAction 的 doBind 方法-->
<!--其配置在 WEB-INF/cas-servlet.xml-->
<transition on="submit" bind="true" validate="true" to="realSubmit">
<evaluate expression="authenticationViaFormAction.doBind(flowRequestContext, flowScope.credentials)" />
</transition>
</view-state>
查看 WEB-INF/cas-servlet.xml
<bean id="authenticationViaFormAction" class="org.jasig.cas.web.flow.AuthenticationViaFormAction"
p:centralAuthenticationService-ref="centralAuthenticationService"
p:warnCookieGenerator-ref="warnCookieGenerator"/>
进入源码,AuthenticationViaFormAction 的 doBind 方法
public final void doBind(final RequestContext context, final Credentials credentials) throws Exception {
final HttpServletRequest request = WebUtils.getHttpServletRequest(context);
<!--将 Request 里的账号密码信息存入 credentials,封装成一个用户凭证-->
if (this.credentialsBinder !=