CAS added the login-free (Remember Me) function, casremember
1. Open deployerConfigContext. xml
Add the following in the authenticationManager bean:
<property name="authenticationMetaDataPopulators"> <list> <bean class="org.jasig.cas.authentication.principal.RememberMeAuthenticationMetaDataPopulator" /> </list></property>
2. login-webflow.xml
Locate viewLoginForm in this file and you can find:
<view-state id="viewLoginForm" view="casLoginView" model="credentials"> <binder> <binding property="username" /> <binding property="password" />
<binding property="rememberMe" /> </binder> <on-entry> <set name="viewScope.commandName" value="'credentials'" /> </on-entry> <transition on="submit" bind="true" validate="true" to="realSubmit"> <evaluate expression="authenticationViaFormAction.doBind(flowRequestContext, flowScope.credentials)" /> </transition></view-state>
In the preceding binder, add:
<Binding property = "rememberMe"/> 3. ticketExpirationPolicies. xmlReplace the bean of grantingTicketExpirationPolicy:
<bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.RememberMeDelegatingExpirationPolicy"> <property name="sessionExpirationPolicy"> <bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy"> <constructor-arg index="0" value="7200000" /> </bean> </property> <property name="rememberMeExpirationPolicy"> <bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy"> <constructor-arg index="0" value="7200000" /> </bean> </property></bean>
7200000 indicates the number of milliseconds.
4. ticketGrantingTicketCookieGenerator. xmlIn
TicketGrantingTicketCookieGeneratorAdded to bean
P: rememberMeMaxAge =" 7200000 "Note that 7200000 is the number of seconds. Make sure that the settings are consistent with those set in ticketExpirationPolicies. xml.
5. casLoginView. jspAdd:
<div class="row check"> <input id="rememberMe" name="rememberMe" value="true" tabindex="4" type="checkbox" /> <label for="rememberMe">remeberMe</label></div>
At this point, the configuration is complete.
In addition, add a login-free Webpage address to the official website:
Https://wiki.jasig.org/display/CASUM/Remember+Me
Questions about cas Automatic Login
Are you sure you have set up your CAS environment? There is CASCLIENT under your application lib. JAR is missing. You have tomcat/conf/server. xml has been configured, and the certificate path has been written or not. If yes, you can get your results. I often do this.
How to cancel a single sign-on in jasig cas
Recently, I am working on single-point logon. The software has the sample war of roller4.0.1jasig CAS 3.3.2acegi security that can complete unified logon. However, I encountered the following problems:. the current situation is that the user is not sure whether he has logged on when he accesses roeller. He will go to the cas server to check whether he has logged on only when he clicks a link and finds that he has no permission, if not, it will go to the cas logon interface. After logging on, it will go to the roroller application. If you have logged on, it will go directly to the roroller application, B. I hope that the user will be able to know whether he has logged on when he first accesses roeller. If he has not logged on, he will continue his current access. When the user needs permission, he will go to the logon interface, if you have logged on, the user name will be displayed somewhere in the header. My idea is to create a filter to filter any url of roeller, and then at the first access, the system writes a tag to the session and forwards it to the cas to check whether the account has been logged on. However, it seems that the logic is still a bit messy in roroller. After logging out, you can also log out on cas, and you can also log out on acegi sample. My current practice is to add a response to the loeller's logout page logout-redirect.jsp. sendRedirect (.. cas/logout), the result is that the logout page on the cas is displayed, but when you access acegi again, the result is not logged out. --------------------------- it is okay to disable the browser, but another problem is that if I want to keep the logon status in the cookie, should I log on automatically the next time I access it? I haven't found out yet if I set the problem in cas: <div class = "quote_title"> lovbreath writes </div> <div class = "quote_div"> <div class = "quote_title"> laorer writes </div> <div class = "quote_div"> Unified registration. My current method is to pass the user name and password to roeller after registration on the cas side, and then add several default values, register a new user with roller <br/> ------------------------------- <br/> to log out and close the browser. <br/> however, there is another problem, if I want to keep my logon status in the cookie, should I automatically log on to the next visit, I have not found that if you set </div> <br/> in cas, do you want to remember me? Let's take a look at the following content.