View Javadoc

1   // ========================================================================
2   // $Id: AbstractCallbackHandler.java 305 2006-03-07 10:32:14Z janb $
3   // Copyright 2003-2004 Mort Bay Consulting Pty. Ltd.
4   // ------------------------------------------------------------------------
5   // Licensed under the Apache License, Version 2.0 (the "License");
6   // you may not use this file except in compliance with the License.
7   // You may obtain a copy of the License at 
8   // http://www.apache.org/licenses/LICENSE-2.0
9   // Unless required by applicable law or agreed to in writing, software
10  // distributed under the License is distributed on an "AS IS" BASIS,
11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  // See the License for the specific language governing permissions and
13  // limitations under the License.
14  // ========================================================================
15  
16  package org.mortbay.jetty.plus.jaas.callback;
17  
18  import java.io.IOException;
19  
20  import javax.security.auth.callback.Callback;
21  import javax.security.auth.callback.CallbackHandler;
22  import javax.security.auth.callback.UnsupportedCallbackException;
23  
24  
25  public abstract class AbstractCallbackHandler implements CallbackHandler
26  {
27      protected String _userName;
28      protected Object _credential;
29  
30      public void setUserName (String userName)
31      {
32          _userName = userName;
33      }
34  
35      public String getUserName ()
36      {
37          return _userName;
38      }
39      
40  
41      public void setCredential (Object credential)
42      {
43          _credential = credential;
44      }
45  
46      public Object getCredential ()
47      {
48          return _credential;
49      }
50      
51      public  void handle (Callback[] callbacks)
52          throws IOException, UnsupportedCallbackException
53      {
54      }
55      
56      
57  }