Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidray/450154 to your computer and use it in GitHub Desktop.
Save davidray/450154 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springsource.org/dtd/spring-beans.dtd">
<!--+
| Application context containing JDBC AuthenticationProvider
| implementation.
+-->
<beans>
<bean id="daoAuthenticationProvider"
class="org.acegisecurity.providers.siteminder.SiteminderAuthenticationProvider">
<property name="userDetailsService">
<ref bean="userDetailsService" />
</property>
</bean>
<bean id="userDetailsService"
class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="authoritiesByUsernameQuery">
<value>
<![CDATA[SELECT username, authority FROM GRANTED_AUTHORITIES WHERE username = ? ORDER BY authority]]>
</value>
</property>
<property name="usersByUsernameQuery">
<value>
<![CDATA[SELECT username, password, enabled FROM USERS WHERE username = ? ORDER BY username]]>
</value>
</property>
</bean>
<!-- This is only for Hypersonic. Please update this section for any other database you are using -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url"
value="jdbc:postgresql://localhost:5432/hibernate" />
<property name="username" value="hibuser" />
<property name="password" value="password" />
</bean>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment