extracted user information from spring servlet config

pull/67/merge
Justin Richer 13 years ago
parent 23fd7b1b21
commit c003bbf2c6

@ -31,8 +31,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<beansProjectDescription>
<version>1</version>
<pluginVersion><![CDATA[2.8.1.201111220115-RELEASE]]></pluginVersion>
<configSuffixes>
<configSuffix><![CDATA[xml]]></configSuffix>
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/webapp/WEB-INF/user-context.xml</config>
</configs>
<configSets>
</configSets>
</beansProjectDescription>

@ -45,16 +45,6 @@
<security:access-denied-handler ref="oauthAccessDeniedHandler" />
</security:http>
<security:http auto-config="true" disable-url-rewriting="true"> <!-- authentication-manager-ref="springSecurityAuthenticationManager" -->
<security:intercept-url pattern="/oauth/**" access="ROLE_USER" />
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:anonymous />
</security:http>
<bean class="org.springframework.security.oauth2.provider.approval.TokenServicesUserApprovalHandler" id="userApprovalHandler">
<property name="tokenServices" ref="defaultOAuth2ProviderTokenService"/>
</bean>
<bean id="oauthAuthenticationEntryPoint" class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
<property name="realmName" value="openidconnect" />
</bean>
@ -82,21 +72,14 @@
</constructor-arg>
</bean>
<bean class="org.springframework.security.oauth2.provider.approval.TokenServicesUserApprovalHandler" id="userApprovalHandler">
<property name="tokenServices" ref="defaultOAuth2ProviderTokenService"/>
</bean>
<bean id="authCodeServices" class="org.springframework.security.oauth2.provider.code.InMemoryAuthorizationCodeServices"/>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider>
<security:user-service id="userDetailsService">
<security:user name="jricher" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mfranklin" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="dcuomo" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mjett" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="aanganes" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mjwalsh" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="srmoore" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
<!-- user services -->
<import resource="user-context.xml" />
<!-- End Spring Security configuration -->

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oauth2="http://www.springframework.org/schema/security/oauth2"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider>
<security:user-service id="userDetailsService">
<security:user name="jricher" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mfranklin" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="dcuomo" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mjett" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="aanganes" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="mjwalsh" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="srmoore" password="password" authorities="ROLE_USER, ROLE_ADMIN" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
<security:http auto-config="true" disable-url-rewriting="true"> <!-- authentication-manager-ref="springSecurityAuthenticationManager" -->
<security:intercept-url pattern="/oauth/**" access="ROLE_USER" />
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:anonymous />
</security:http>
</beans>
Loading…
Cancel
Save