草庐IT

www-authenticate

全部标签

java - Java SSLContextImpl$TLS10Context 的随机 "peer not authenticated"异常

我在使用SSL连接到HAProxy服务器时随机出现连接失败。我已确认这些故障发生在JDK版本1.7.0_21和1.7.0_25上,但不会发生在1.7.0_04或1.6.0_38上。异常(exception)是Exceptioninthread"main"javax.net.ssl.SSLPeerUnverifiedException:peernotauthenticatedatsun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)atSSLTest2.main(SSLTest2.java:

java - Apache CXF : How to secure JAX-RS web service with basic authentication

我有一个Spring应用程序,它使用ApacheCXF(使用jax-rs)发布一些RESTfulWeb服务。我想使用HTTP基本身份验证来保护对这些服务的访问。用户名和密码应该在Spring配置文件中。主应用程序已经使用了SpringSecurity,我不想弄乱那个设置。最简单的方法是什么?我可以编写自己的ServletFilter,但肯定有办法配置它吗? 最佳答案 HTTPBasicAuthenticationwithApacheCXFRevisited的作者提供了实现HTTP基本身份验证验证的CXF拦截器的代码,以及如何定义安全

spring - 无法找到 XML 模式命名空间的 Spring NamespaceHandler [http ://www. springframework.org/schema/tx]

我正在尝试ro运行spring项目(列出了哪些配置文件here,但我在eclipse控制台中收到以下错误:Grave:Allocateexceptionforservletsdnextorg.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configurationproblem:UnabletolocateSpringNamespaceHandlerforXMLschemanamespace[http://www.springframework.org/schema/tx]Offendingre

spring - 找不到 XML 模式命名空间的 Spring NamespaceHandler [http ://www. springframework.org/schema/batch]

情况我正在使用SpringBatch为我们的数据仓库构建一个累积快照,但我遇到了一个我无法弄清楚的配置障碍。我使用Spring模板项目创建了一个带有STS(SpringSourceToolSuite2.8.1)的简单SpringBatch项目。这是我创建的两个xml配置文件:launch-context.xml和module-context.xmlExamplejobtogetyoustarted.Itprovidesaskeletonforatypicalbatchapplication.问题我运行以下命令来编译和打包项目:mvncleancompileinstall然后我这样做:c

Spring 安全 : Access the current authenticated User inside a servlet Filter

我最近开始学习SpringSecurity,今天我遇到了一个基本的(我相信的)问题:为什么我不能访问Servlet过滤器中的当前Principal,如下面的类(class)所示:packagecom.acme.test;importjava.io.IOException;importjavax.servlet.Filter;importjavax.servlet.FilterChain;importjavax.servlet.FilterConfig;importjavax.servlet.ServletException;importjavax.servlet.ServletRequ

Spring:注解等价于 security:authentication-manager 和 security:global-method-security

在XML配置中,我可以使用security命名空间来启用对安全性的支持,例如:我尝试使用没有XML的Spring,只有@Configuration类。与上述XML示例类似的配置的纯Java等价物是什么? 最佳答案 编辑:2013年12月SpringSecurity3.2wasreleased和JavaConfigurationwasimplemented,所以上面的XML大致相当于:@Configuration@EnableGlobalMethodSecurity(prePostEnabled=true)publicclassSec

spring - schema_reference.4 : Failed to read schema document 'http://www. springframework.org/schema/beans/spring-beans-4.1.5.xsd

我在Eclipse中的spring-dispatcher.xml中遇到错误,如下所示。schema_reference.4:Failedtoreadschemadocument'http://www.springframework.org/schema/beans/spring-beans-4.1.5.xsd',because1)couldnotfindthedocument;2)thedocumentcouldnotberead;3)therootelementofthedocumentisnot.我有最新的spring库...spring-beans-4.1.5.RELEASE.j

java - 无法 Autowiring 字段 : private org. springframework.security.authentication.AuthenticationManager

我正在尝试使用本教程创建OAuth2服务器提供程序SpringOAuth2.示例和我的项目之间的主要区别-我不使用SpringBoot。我尝试拆分这些类(GitHubexamplelink)我创建了2个类:@Configuration@Order(-20)@EnableResourceServerpublicclassWebSecurityConfigextendsWebSecurityConfigurerAdapter{@AutowiredprivateAuthenticationManagerauthenticationManager;@Overrideprotectedvoidc

spring - 在 SecurityContext 中找不到 Authentication 对象 - Spring 3.2.2

我正在尝试从实现ApplicationListener的类中调用protected方法。成功登录的界面(Spring3.2.2和SpringSecurity3.2.0M1)。This是我之前的问题。应用程序在以下环境下运行。Spring3.2.2Spring安全3.2.0JPA2.0JSF2.1.9MySQL5.6.11JDK-7u11NetBeans7.2.1我已将以下与Spring安全性相关的库添加到类路径中。spring-security-core-3.2.0.M1.jarspring-security-config-3.2.0.M1.jarspring-security-web

spring - @RequestBody MultiValueMap 不支持内容类型 'application/x-www-form-urlencoded;charset=UTF-8'

基于答案forproblemwithx-www-form-urlencodedwithSpring@Controller我写了下面的@Controller方法@RequestMapping(value="/{email}/authenticate",method=RequestMethod.POST,produces={"application/json","application/xml"},consumes={"application/x-www-form-urlencoded"})public@ResponseBodyRepresentationauthenticate(@Pat