Source Code Cross Referenced for CredentialHandler.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » security » spi » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.security.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.jetspeed.security.spi;
018:
019:        import java.sql.Date;
020:        import java.util.Set;
021:
022:        import org.apache.jetspeed.security.SecurityException;
023:
024:        /**
025:         * <p>
026:         * This interface encapsulates the handling of security credentials.
027:         * </p>
028:         * <p>
029:         * This provides a central placeholder for changing the mapping of user
030:         * credentials.  The default implementation only supports <code>PasswordCredential</code>
031:         * </p>
032:         * <p>
033:         * A security implementation wanting to map additional credentials should do so
034:         * here.
035:         * </p>
036:         * 
037:         * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
038:         */
039:        public interface CredentialHandler {
040:            /**
041:             * <p>
042:             * Gets the public credentials for the user.
043:             * </p>
044:             * 
045:             * @param username The username.
046:             * @return The set of public credentials.
047:             */
048:            Set getPublicCredentials(String username);
049:
050:            /**
051:             * <p>
052:             * Gets the private credentials for the user.
053:             * </p>
054:             * 
055:             * @param username The username.
056:             * @return The set of private credentials.
057:             */
058:            Set getPrivateCredentials(String username);
059:
060:            /**
061:             * <p>
062:             * Adds or updates a private password credential.<br>
063:             * Note that there is no checking of the <code>oldPassword</code> and the provided password is 
064:             * assumed to be encoded. Hence no encoding will take place.
065:             * 
066:             * </p>
067:             * 
068:             * @param username The user to be updated.
069:             * @param newPassword The new password.
070:             * @throws SecurityException Throws a {@link SecurityException}.
071:             */
072:            void importPassword(String userName, String newPassword)
073:                    throws SecurityException;
074:
075:            /**
076:             * <p>
077:             * Adds or updates a private password credential.<br>
078:             * If <code>oldPassword</code> is not null, the oldPassword will first be checked (authenticated).<br>
079:             * </p>
080:             * 
081:             * @param username The user to be updated.
082:             * @param oldPassword The old password.
083:             * @param newPassword The new password.
084:             * @throws SecurityException Throws a {@link SecurityException}.
085:             */
086:            void setPassword(String userName, String oldPassword,
087:                    String newPassword) throws SecurityException;
088:
089:            /**
090:             * <p>
091:             * Set the update required state of the user password credential.
092:             * </p>
093:             * 
094:             * @param userName The user name.
095:             * @param updateRequired The update required state.
096:             * @throws Throws a security exception.
097:             */
098:            void setPasswordUpdateRequired(String userName,
099:                    boolean updateRequired) throws SecurityException;
100:
101:            /**
102:             * <p>
103:             * Set the enabled state of the user password credential.
104:             * </p>
105:             * 
106:             * @param userName The user name.
107:             * @param enabled The enabled state.
108:             * @throws Throws a security exception.
109:             */
110:            void setPasswordEnabled(String userName, boolean enabled)
111:                    throws SecurityException;
112:
113:            /**
114:             * <p>
115:             * Set the expiration date and the expired flag of the password credential.</p>
116:             * <p>
117:             * If a date equal or before the current date is provided, the expired flag will be set to true,
118:             * otherwise to false.</p>
119:             * 
120:             * @param userName The user name.
121:             * @param expirationDate The expiration date to set.
122:             * @throws Throws a security exception.
123:             */
124:            void setPasswordExpiration(String userName, Date expirationDate)
125:                    throws SecurityException;
126:
127:            /**
128:             * <p>
129:             * Authenticate a user.
130:             * </p>
131:             * 
132:             * @param userName The user name.
133:             * @param password The user password.
134:             * @return Whether or not a user is authenticated.
135:             */
136:            boolean authenticate(String userName, String password)
137:                    throws SecurityException;
138:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.