Source Code Cross Referenced for Authenticator.java in  » Web-Mail » jwebmail-0.7 » net » wastl » webmail » server » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Mail » jwebmail 0.7 » net.wastl.webmail.server 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* CVS ID: $Id: Authenticator.java,v 1.1.1.1 2002/10/02 18:42:51 wastl Exp $ */
002:        package net.wastl.webmail.server;
003:
004:        import net.wastl.webmail.config.ConfigScheme;
005:        import net.wastl.webmail.exceptions.*;
006:
007:        import org.webengruven.webmail.auth.AuthDisplayMngr;
008:
009:        /**
010:         * Authenticator.java
011:         *
012:         * Created: Mon Apr 19 11:01:22 1999
013:         *
014:         * Copyright (C) 1999-2000 Sebastian Schaffert
015:         * 
016:         * This program is free software; you can redistribute it and/or
017:         * modify it under the terms of the GNU General Public License
018:         * as published by the Free Software Foundation; either version 2
019:         * of the License, or (at your option) any later version.
020:         * 
021:         * This program is distributed in the hope that it will be useful,
022:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
023:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
024:         * GNU General Public License for more details.
025:         * 
026:         * You should have received a copy of the GNU General Public License
027:         * along with this program; if not, write to the Free Software
028:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
029:         */
030:        /**
031:         * Generic class for user authentication.
032:         * This class actually doesn't do anything.
033:         *
034:         * @author Sebastian Schaffert
035:         * @version 1.0
036:         * @see AuthenticatorHandler
037:         * @see net.wastl.webmail.storage.simple.SimpleStorage
038:         */
039:        /* 9/24/2000 devink -- changed for challenge/response authentication */
040:        public abstract class Authenticator {
041:            protected String key;
042:
043:            public Authenticator() {
044:
045:            }
046:
047:            public String getKey() {
048:                return key;
049:            }
050:
051:            public abstract String getVersion();
052:
053:            /** Get a displamanager object for this class.  
054:             * @see org.webengruven.webamil.auth.AuthDisplayMngr
055:             * @return the AuthDisplayMngr apropriate for this class.
056:             */
057:            public AuthDisplayMngr getAuthDisplayMngr() {
058:                return new AuthDisplayMngr();
059:            }
060:
061:            /**
062:             * (Re-)Initialize this authenticator.
063:             * Needed as we can't use the Constructor properly with the Plugin-style.
064:             * @param parent Give the Storage to allow the authenticator to check 
065:             *  certain things.
066:             */
067:            public abstract void init(Storage store);
068:
069:            /**
070:             * Register this authenticator with WebMail.
071:             */
072:            public abstract void register(ConfigScheme store);
073:
074:            /**
075:             * Authentication to be done *before* UserData is available.
076:             * You may use a Unix login() for example to check whether a user is 
077:             * allowed to use WebMail in general
078:             * Subclasses should override this. 
079:             * It simply does nothing in this implementation.
080:             * 
081:             * @param login Login-name for the user
082:             * @param domain Domain name the user used to log on
083:             * @param passwd Password to verify
084:             */
085:            public void authenticatePreUserData(String login, String domain,
086:                    String passwd) throws InvalidPasswordException {
087:                if (login.equals("") || passwd.equals("")) {
088:                    throw new InvalidPasswordException();
089:                }
090:            }
091:
092:            /**
093:             * Authentication with available UserData. 
094:             * This usually should just check the password saved by the user, but 
095:             * may also be empty if you trust the pre-authentication (perhaps 
096:             * that was done against the Unix-login(), you can really trust in in that
097:             * case.
098:             * Subclasses should override this. It simply does nothing in this 
099:             * implementation.
100:             * 
101:             * @param udata UserData for this user
102:             * @param domain Domain name the user used to log on
103:             * @param passwd Password to verify
104:             */
105:            public void authenticatePostUserData(UserData udata, String domain,
106:                    String password) throws InvalidPasswordException {
107:            }
108:
109:            /**
110:             * Tell WebMail whether this authentication method allows users to 
111:             * change their passwords.
112:             * A Password-change option is then shown in the Options-Dialog.
113:             */
114:            public boolean canChangePassword() {
115:                return true;
116:            }
117:
118:            public void changePassword(UserData udata, String newpassword,
119:                    String verify) throws InvalidPasswordException {
120:            }
121:
122:        } // Authenticator
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.