extracted user information from spring servlet config

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

@ -1,43 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>openid</name> <name>openid</name>
<comment>Reference implementation of OpenID Connect spec (http://openid.net/connect/). NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment> <comment>Reference implementation of OpenID Connect spec (http://openid.net/connect/). NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects> <projects>
<project>spring-security-oauth2</project> <project>spring-security-oauth2</project>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name> <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name> <name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> <buildCommand>
<natures> <name>org.springframework.ide.eclipse.core.springbuilder</name>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <arguments>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> </arguments>
<nature>org.eclipse.jdt.core.javanature</nature> </buildCommand>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> </buildSpec>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> <natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.springframework.ide.eclipse.core.springnature</nature>
</natures> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
</projectDescription> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

@ -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:access-denied-handler ref="oauthAccessDeniedHandler" />
</security:http> </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"> <bean id="oauthAuthenticationEntryPoint" class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
<property name="realmName" value="openidconnect" /> <property name="realmName" value="openidconnect" />
</bean> </bean>
@ -82,22 +72,15 @@
</constructor-arg> </constructor-arg>
</bean> </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"/> <bean id="authCodeServices" class="org.springframework.security.oauth2.provider.code.InMemoryAuthorizationCodeServices"/>
<security:authentication-manager alias="authenticationManager"> <!-- user services -->
<security:authentication-provider> <import resource="user-context.xml" />
<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>
<!-- End Spring Security configuration --> <!-- End Spring Security configuration -->
<!-- JPA --> <!-- JPA -->

@ -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