草庐IT

already_authenticated

全部标签

java - 如何解决 'Program type already present: com.google.common.util.concurrent.ListenableFuture' ?

我正在尝试使用WorkManager1.0.0-alpha09。并收到此错误:Programtypealreadypresent:com.google.common.util.concurrent.ListenableFutureMessage{kind=ERROR,text=Programtypealreadypresent:com.google.common.util.concurrent.ListenableFuture,sources=[Unknownsourcefile],toolname=Optional.of(D8)}如果我使用1.0.0-alpha08或更低版本。我没有

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 安全 : 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

java.lang.IllegalStateException : getAttribute: Session already invalidated

在我的代码中使portletRequestsession无效后,我收到以下异常Aug27,20137:07:13AMorg.apache.catalina.core.ApplicationDispatcherinvokeSEVERE:Servlet.service()forservletxyzapplicationServletthrewexceptionjava.lang.IllegalStateException:getAttribute:Sessionalreadyinvalidatedatorg.apache.catalina.session.StandardSession.g

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

java.lang.IllegalStateException : BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

我需要将带有自定义登录页面和数据库连接的SpringSecurity添加到我的SpringMVC项目中。我收到以下错误消息,根据其他问题的答案,我尝试更改代码,例如我将SpringSecuritySchema版本更改为4.0,但代码返回以下错误:将架构更改为4.0http://www.springframework.org/schema/security/spring-security-4.0.xsd错误Cannotinitializecontextbecausethereisalreadyarootapplicationcontextpresent-checkwhetheryouha

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

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

java - Spring + hibernate : a different object with the same identifier value was already associated with the session

在我使用Spring和Hibernate的应用程序中,我解析一个CSV文件并通过调用handleRow()填充数据库。每次从CSV文件中读取记录。我的领域模型:'Family'hasmany'SubFamily''SubFamily'hasmany'Locus'a'Locus'belongstoa'Species'FamilySubFamilyLocus都是双向映射。代码:publicvoidhandleRow(FamilydummyFamily,SubFamilydummySubFamily,LocusdummyLocus){//ServicemethodwhichaccessDAO

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