diff --git a/spring-security-kerberos-sample/src/main/java/org/springframework/security/extensions/kerberos/sample/DummyUserDetailsService.java b/spring-security-kerberos-sample/src/main/java/org/springframework/security/extensions/kerberos/sample/DummyUserDetailsService.java new file mode 100644 index 0000000..7bbb874 --- /dev/null +++ b/spring-security-kerberos-sample/src/main/java/org/springframework/security/extensions/kerberos/sample/DummyUserDetailsService.java @@ -0,0 +1,40 @@ +/* + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.security.extensions.kerberos.sample; + +import org.springframework.dao.DataAccessException; +import org.springframework.security.core.authority.AuthorityUtils; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; + +/** + * + * @author Mike Wiesner + * @since 1.0 + * @version $Id$ + */ +public class DummyUserDetailsService implements UserDetailsService { + + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException { + return new User(username, "notUsed", true, true,true,true, AuthorityUtils.createAuthorityList("ROLE_USER")); + } + +} diff --git a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/security.xml b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/security.xml index f3c6f8c..fb45cec 100644 --- a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/security.xml +++ b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/security.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> - + @@ -17,12 +17,12 @@ class="org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter" /> - - + class="org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter"> + + - - + + - - + + - - - - - mike@SECPOD.DE=notUsed,ROLE_ADMIN + + + + + + + + + + mike@SECPOD.DE=notUsed,ROLE_ADMIN - -