我正在尝试使用CAS和Spring Security在多个Web应用程序中实现SSO.预期案例:
CAS - http:// localhost:8080/cas/
App受
保护的内容 - http://localhost:8081/ cas-client1/secure/ index.html App B受保护的内容 - http:// localhost:8081/CAS-客户机程序/安全/ index.html的
1)当用户访问cas-client1时,将提示CAS登录表单并触发认证.
2)相同的用户访问cas-client2,应该识别以前的登录,并且不会提示登录表单
但是,我未能执行第2步.CAS登录表单仍然提示用户,因此需要双重登录.我的Spring Security配置中是否有任何错误设置:
<security:http entry-point-ref="casAuthenticationEntryPoint" auto-config="true">
<security:intercept-url pattern="/secure/**" access="ROLE_USER" />
<security:custom-filter position="CAS_FILTER" ref="casAuthenticationFilter" />
</security:http>
<bean id="casAuthenticationEntryPoint" class="org.springframework.security.cas.web.CasAuthenticationEntryPoint">
<property name="loginUrl" value="http://localhost:8080/cas/login" />
<property name="serviceProperties" ref="serviceProperties" />
</bean>
<bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
<!-- http://localhost:8081/cas-client2 for app 2-->
<property name="service" value="http://localhost:8081/cas-client1/j_spring_cas_security_check" />
</bean>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider ref="casAuthenticationProvider" />
</security:authentication-manager>
<bean id="casAuthenticationFilter" class="org.springframework.security.cas.web.CasAuthenticationFilter">
<property name="authenticationManager" ref="authenticationManager" />
<property name="authenticationFailureHandler">
<bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler">
<property name="defaultFailureUrl" value="/casfailed.jsp" /> …Run Code Online (Sandbox Code Playgroud) 我已将以下代码添加到我的web.config文件中:
<system.diagnostics>
<trace autoflush="false" indentsize="4" >
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="d:\debugging.txt" />
<remove name="Default"></remove>
</listeners>
</trace>
</system.diagnostics>
Run Code Online (Sandbox Code Playgroud)
我写了这一行来发送跟踪输出:
System.Diagnostics.Trace.Write(sID + " tracing id");
Run Code Online (Sandbox Code Playgroud)
但是,我看不到在我的d:驱动器上创建的任何"debugging.txt"文件,并且没有跟踪输出.
我错过了什么吗?
如何将MySQL表的数据,结构和索引复制或克隆或复制到新表?
这是我到目前为止所发现的.
这将复制数据和结构,但不复制索引:
create table {new_table} select * from {old_table};
Run Code Online (Sandbox Code Playgroud)
这将复制结构和索引,但不复制数据:
create table {new_table} like {old_table};
Run Code Online (Sandbox Code Playgroud) 我用maven建立了一个JSF2.0项目.一切正常,行动处理:-(
这是我的.xhtml页面:
<h:form>
<h:commandButton
id="submit"
value="Absenden"
action="#(projectController.saveProject)">
</h:commandButton>
</h:form>
Run Code Online (Sandbox Code Playgroud)
在这里我的托管bean:
@ManagedBean
@SessionScoped
public class ProjectController {
public String saveProject(){
System.out.println("test");
return("/newProject.xhtml");
}
...
Run Code Online (Sandbox Code Playgroud)
当我尝试按下按钮时没有任何反应.没有错误消息......没有.但数据绑定工作!只有actions/actionlisteners不起作用
也许有人对我有答案:-)干杯
如何从URL获取ASP.NET用户名和密码?
https://myUser:myPassword@myServer/
Run Code Online (Sandbox Code Playgroud)
HttpContext.Current.Request.Url正在恢复https://myServer/.
是
(int)(int1 / (float)var2.Count() * 100)
Run Code Online (Sandbox Code Playgroud)
相当于
(int)((int1 / (float)var2.Count()) * 100)
Run Code Online (Sandbox Code Playgroud)
...它会使用浮点数还是整数除法?
编辑...如果上面的答案是肯定的,那么在这里执行浮点除法有什么好处?
在Android中处理一个简单的程序时,我错误地关闭了LogCat窗口,我想知道如何再次显示它.
我有一个看起来像这样的数组:
array[0]: 6 8
array[1]: 12 9 6
array[2]: 33 32 5
array[3]: 8 6
Run Code Online (Sandbox Code Playgroud)
我想对这个数组进行排序,使它看起来像这样:
array[0]: 6 8
array[1]: 6 9 12
array[2]: 5 32 33
array[3]: 6 8
Run Code Online (Sandbox Code Playgroud)
我知道我可以对数组进行排序@newarray = sort {$a cmp $b} @array;,但我也需要对每行中的元素进行排序.我怎样才能做到这一点?
我正在尝试实现基于时间轴的动画,动画可以是:
是否有可用于此目的的Javascript动画/补间引擎?或者强烈推荐这个?
Hwlp会很棒,特别是因为这真的让我感兴趣!=)