1   /*
2    * Apache License
3    * Version 2.0, January 2004
4    * http://www.apache.org/licenses/
5    *
6    * Copyright 2008 by chenillekit.org
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * You may obtain a copy of the License at
11   *
12   * http://www.apache.org/licenses/LICENSE-2.0
13   */
14  
15  package org.chenillekit.access.services.impl;
16  
17  import org.chenillekit.access.WebSessionUser;
18  import org.chenillekit.access.services.AuthenticationService;
19  import org.chenillekit.access.utils.DummyUser;
20  
21  /**
22   * ...
23   *
24   * @version $Id: UserAuthServiceImpl.java 380 2008-12-30 10:21:52Z mlusetti $
25   */
26  public class UserAuthServiceImpl implements AuthenticationService
27  {
28  	public WebSessionUser doAuthenticate( String userName, String password )
29  	{
30  		if ( "root".equals( userName ) ) return new DummyUser(10);
31  		if ( "dummy".equals( userName ) ) return new DummyUser(0);
32  		return null;
33  	}
34  }