View Javadoc

1   /* 
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8   *
9   *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17  package org.apache.jetspeed.security.spi.impl;
18  
19  import java.util.Collection;
20  
21  import org.apache.jetspeed.security.SecurityException;
22  import org.apache.jetspeed.security.om.InternalCredential;
23  import org.apache.jetspeed.security.om.InternalUserPrincipal;
24  import org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor;
25  import org.apache.jetspeed.security.spi.PasswordCredentialProvider;
26  
27  /***
28   * <p>
29   * Base class providing default empty behavior for a {@link InternalPasswordCredentialInterceptor}
30   * implementation.
31   * </p>
32   * 
33   * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
34   * @version $Id$
35   */
36  public abstract class AbstractInternalPasswordCredentialInterceptorImpl implements InternalPasswordCredentialInterceptor
37  {
38      /***
39       * @return false
40       * @see org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor#afterLoad(org.apache.jetspeed.security.spi.PasswordCredentialProvider, java.lang.String, org.apache.jetspeed.security.om.InternalCredential)
41       */
42      public boolean afterLoad(PasswordCredentialProvider pcProvider, String userName, InternalCredential credential)
43              throws SecurityException
44      {
45          return false;
46      }
47  
48      /***
49       * @return false
50       * @see org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor#afterAuthenticated(org.apache.jetspeed.security.om.InternalUserPrincipal, java.lang.String, org.apache.jetspeed.security.om.InternalCredential, boolean)
51       */
52      public boolean afterAuthenticated(InternalUserPrincipal internalUser, String userName,
53              InternalCredential credential, boolean authenticated) throws SecurityException
54      {
55          return false;
56      }
57  
58      /***
59       * @see org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor#beforeCreate(org.apache.jetspeed.security.om.InternalUserPrincipal, java.util.Collection, java.lang.String, InternalCredential, java.lang.String)
60       */
61      public void beforeCreate(InternalUserPrincipal internalUser, Collection credentials, String userName,
62              InternalCredential credential, String password) throws SecurityException
63      {
64      }
65  
66      /***
67       * @see org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor#beforeSetPassword(org.apache.jetspeed.security.om.InternalUserPrincipal, java.util.Collection, java.lang.String, org.apache.jetspeed.security.om.InternalCredential, java.lang.String, boolean)
68       */
69      public void beforeSetPassword(InternalUserPrincipal internalUser, Collection credentials, String userName,
70              InternalCredential credential, String password, boolean authenticated) throws SecurityException
71      {
72      }
73  }