01: // ========================================================================
02: // $Id: AbstractCallbackHandler.java 305 2006-03-07 10:32:14Z janb $
03: // Copyright 2003-2004 Mort Bay Consulting Pty. Ltd.
04: // ------------------------------------------------------------------------
05: // Licensed under the Apache License, Version 2.0 (the "License");
06: // you may not use this file except in compliance with the License.
07: // You may obtain a copy of the License at
08: // http://www.apache.org/licenses/LICENSE-2.0
09: // 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: public abstract class AbstractCallbackHandler implements
25: CallbackHandler {
26: protected String _userName;
27: protected Object _credential;
28:
29: public void setUserName(String userName) {
30: _userName = userName;
31: }
32:
33: public String getUserName() {
34: return _userName;
35: }
36:
37: public void setCredential(Object credential) {
38: _credential = credential;
39: }
40:
41: public Object getCredential() {
42: return _credential;
43: }
44:
45: public void handle(Callback[] callbacks) throws IOException,
46: UnsupportedCallbackException {
47: }
48:
49: }
|