argeo.osgi.start.1.node=\
-org.springframework.osgi.extender,\
+org.eclipse.gemini.blueprint.extender
argeo.osgi.start.3.node=\
org.argeo.node.repo.jackrabbit,\
argeo.osgi.start.1.node=\
-org.springframework.osgi.extender
+org.eclipse.gemini.blueprint.extender
#org.argeo.server.ads.server,\
filter="(argeo.jcr.repository.alias=node)" />\r
\r
<reference id="authenticationManager"\r
- interface="org.springframework.security.core.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
\r
<!-- SERVICES -->\r
<service ref="cmsRepository" interface="javax.jcr.Repository">\r
<reference id="repositoryFactory" interface="javax.jcr.RepositoryFactory" />\r
\r
<reference id="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
<reference id="userDetailsService"\r
- interface="org.springframework.security.userdetails.UserDetailsService" />\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService" />\r
</beans:beans>
\ No newline at end of file
\r
<!-- SERVICES -->\r
<service ref="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager"\r
+ interface="org.springframework.security.authentication.AuthenticationManager"\r
context-class-loader="service-provider" />\r
\r
<!-- User management -->\r
<!-- <service ref="userDetailsManager" -->\r
-<!-- interface="org.springframework.security.userdetails.UserDetailsService" -->\r
+<!-- interface="org.springframework.security.core.userdetails.UserDetailsService" -->\r
<!-- context-class-loader="service-provider" /> -->\r
<!-- <service ref="userDetailsManager" -->\r
-<!-- interface="org.springframework.security.userdetails.UserDetailsManager" -->\r
+<!-- interface="org.springframework.security.provisioning.UserDetailsManager" -->\r
<!-- context-class-loader="service-provider" /> -->\r
<!-- <service ref="userDetailsManager" interface="org.argeo.security.UserAdminService" -->\r
<!-- context-class-loader="service-provider" /> -->\r
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
<!-- </bean> -->
<bean id="anonymousAuthenticationProvider"
- class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
+ class="org.springframework.security.authentication.AnonymousAuthenticationProvider">
<description><![CDATA[Anonymous authentication]]></description>
<property name="key" value="${argeo.security.systemKey}" />
</bean>
initialization himself, in order to prevent the following dependency cycle:
Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider
<= Repository.login() in init() -->
- <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="internalAuthenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
--- /dev/null
+package org.argeo.security.core;
+
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+
+public class InternalAuthenticationProvider implements AuthenticationProvider {
+ private String key;
+
+ @Override
+ public Authentication authenticate(Authentication arg0)
+ throws AuthenticationException {
+ InternalAuthentication authentication = (InternalAuthentication) arg0;
+ if (authentication.getCredentials().toString().equals(key))
+ return authentication;
+ return null;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ @Override
+ public boolean supports(Class<?> authentication) {
+ return InternalAuthentication.class.isAssignableFrom(authentication);
+ }
+
+}
\r
<!-- SERVICES -->\r
<service ref="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
\r
<!-- User management -->\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsService"\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsManager"\r
+ interface="org.springframework.security.provisioning.UserDetailsManager"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager" interface="org.argeo.security.UserAdminService"\r
context-class-loader="service-provider" />\r
<property name="bundleContext" ref="bundleContext" />
</bean>
- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
himself, in order to prevent the following dependency cycle: Repository.login()
<= AuthenticationManager <= osJcrAuthenticationProvider <= Repository.login()
in init() -->
- <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="internalAuthenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
<!-- <property name="bundleContext" ref="bundleContext" /> -->
<!-- </bean> -->
- <!-- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager"> -->
+ <!-- <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> -->
<!-- <property name="providers"> -->
<!-- <list> -->
<!-- <ref bean="authByAdapterProvider" /> -->
\r
<!-- SERVICES -->\r
<service ref="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
\r
<!-- User management -->\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsService" />\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService" />\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsManager" />\r
+ interface="org.springframework.security.provisioning.UserDetailsManager" />\r
<service ref="userDetailsManager" interface="org.argeo.security.UserAdminService" />\r
\r
</beans:beans>
\ No newline at end of file
</property>
</bean>
- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="authenticationManager"
+ class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
</bean>
<!-- Authentication providers -->
- <bean id="authByAdapterProvider"
- class="org.springframework.security.adapters.AuthByAdapterProvider">
+ <bean id="authByAdapterProvider" class="org.argeo.security.core.InternalAuthenticationProvider">
<property name="key" value="${argeo.security.systemKey}" />
</bean>
<bean id="anonymousAuthenticationProvider"
- class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
+ class="org.springframework.security.authentication.AnonymousAuthenticationProvider">
<description><![CDATA[Anonymous authentication]]></description>
<property name="key" value="${argeo.security.systemKey}" />
</bean>
initialization himself, in order to prevent the following dependency cycle:
Repository.login() <= AuthenticationManager <= JackrabbitUserAdminService
<= Repository.login() in init() -->
- <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="internalAuthenticationManager"
+ class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
\r
<!-- SERVICES -->\r
<service ref="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager"\r
+ interface="org.springframework.security.authentication.AuthenticationManager"\r
context-class-loader="service-provider" />\r
\r
<!-- User management -->\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsService"\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsManager"\r
+ interface="org.springframework.security.provisioning.UserDetailsManager"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager" interface="org.argeo.security.UserAdminService"\r
context-class-loader="service-provider" />\r
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
</bean>
<bean id="anonymousAuthenticationProvider"
- class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
+ class="org.springframework.security.authentication.AnonymousAuthenticationProvider">
<description><![CDATA[Anonymous authentication]]></description>
<property name="key" value="${argeo.security.systemKey}" />
</bean>
initialization himself, in order to prevent the following dependency cycle:
Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider
<= Repository.login() in init() -->
- <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="internalAuthenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
\r
<!-- SERVICES -->\r
<service ref="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
\r
<!-- User management -->\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsService"\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsManager"\r
+ interface="org.springframework.security.provisioning.UserDetailsManager"\r
context-class-loader="service-provider" />\r
<service ref="userDetailsManager" interface="org.argeo.security.UserAdminService"\r
context-class-loader="service-provider" />\r
<property name="bundleContext" ref="bundleContext" />
</bean>
- <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
himself, in order to prevent the following dependency cycle: Repository.login()
<= AuthenticationManager <= osJcrAuthenticationProvider <= Repository.login()
in init() -->
- <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <bean id="internalAuthenticationManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref bean="authByAdapterProvider" />
osgi:default-timeout="30000">\r
\r
<reference id="authenticationManager"\r
- interface="org.springframework.security.core.AuthenticationManager"\r
+ interface="org.springframework.security.authentication.AuthenticationManager"\r
context-class-loader="client" />\r
</beans:beans>
\ No newline at end of file
osgi:default-timeout="30000">\r
\r
<reference id="userDetailsManager"\r
- interface="org.springframework.security.userdetails.UserDetailsManager"\r
+ interface="org.springframework.security.provisioning.UserDetailsManager"\r
cardinality="0..1" />\r
</beans:beans>
\ No newline at end of file
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
\r
<reference id="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
+ interface="org.springframework.security.authentication.AuthenticationManager" />\r
<reference id="userDetailsService"\r
- interface="org.springframework.security.userdetails.UserDetailsService"\r
+ interface="org.springframework.security.core.userdetails.UserDetailsService"\r
cardinality="0..1" />\r
</beans:beans>
\ No newline at end of file