/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Contents of files are in the Properties file format.
*
* @param namesFile name of file containing name to canonicalized name
* @param proxyFile name of file containing authname to list of authzids
*/
dir = ".";
}
pwDb = new Properties();
}
namesDb = new Properties();
}
proxyDb = new Properties();
}
}
throws UnsupportedCallbackException {
if (callbacks[i] instanceof NameCallback) {
} else if (callbacks[i] instanceof PasswordCallback) {
} else if (callbacks[i] instanceof AuthorizeCallback) {
} else if (callbacks[i] instanceof RealmCallback) {
} else {
throw new UnsupportedCallbackException(callbacks[i]);
}
}
// Process retrieval of password; can get password iff
// username is available in NameCallback
//
// Ignore realm for now; could potentially use different dbs for
// different realms
// Clear pw
pwchars[i] = 0;
}
// Set canonicalized username if any
if (canonAuthid != null) {
}
}
}
// Check for authorization
// Ignore realm for now; could potentially use different dbs for
// different realms
// Self is always authorized
acb.setAuthorized(true);
} else {
// Check db for allowed authzids
: null);
// XXX need to search for subtrings or use StringTokenizer
// to avoid incorrectly matching subnames
acb.setAuthorized(true);
}
}
if (acb.isAuthorized()) {
// Set canonicalized name
if (canonAuthzid != null) {
}
}
}
}
}