1 package org.apache.fulcrum.security.entity; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 import java.io.Serializable; 22 23 /** 24 * This interface represents the basic functionality of a user. 25 * 26 * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a> 27 * @version $Id$ 28 */ 29 public interface User extends Serializable, SecurityEntity 30 { 31 /** 32 * Returns the user's password. This method should not be used by the 33 * application directly, because it's meaning depends upon the 34 * implementation of UserManager that manages this particular user object. 35 * Some implementations will use this attribute for storing a password 36 * encrypted in some way, other will not use it at all, when user entered 37 * password is presented to some external authority (like NT domain 38 * controller) to validate it. See also 39 * {@link org.apache.fulcrum.security.UserManager#authenticate(User,String)} 40 * . 41 * 42 * @return A String with the password for the user. 43 */ 44 String getPassword(); 45 46 /** 47 * Set password. Application should not use this method directly, see 48 * {@link #getPassword()}. See also 49 * {@link org.apache.fulcrum.security.UserManager#changePassword(User,String,String)} 50 * . 51 * 52 * @param password 53 * The new password. 54 */ 55 void setPassword(String password); 56 57 }