View | Details | Raw Unified | Return to bug 64011
Collapse All | Expand All

(-)a/java/org/apache/catalina/realm/JNDIRealm.java (+17 lines)
Lines 62-67 import javax.net.ssl.SSLSocketFactory; Link Here
62
62
63
import org.apache.catalina.LifecycleException;
63
import org.apache.catalina.LifecycleException;
64
import org.ietf.jgss.GSSCredential;
64
import org.ietf.jgss.GSSCredential;
65
import org.ietf.jgss.GSSName;
65
66
66
/**
67
/**
67
 * <p>Implementation of <strong>Realm</strong> that works with a directory
68
 * <p>Implementation of <strong>Realm</strong> that works with a directory
Lines 2260-2265 public class JNDIRealm extends RealmBase { Link Here
2260
        return getPrincipal(username, null);
2261
        return getPrincipal(username, null);
2261
    }
2262
    }
2262
2263
2264
    @Override
2265
    protected Principal getPrincipal(GSSName gssName,
2266
            GSSCredential gssCredential) {
2267
        String name = gssName.toString();
2268
2269
        if (isStripRealmForGss()) {
2270
            int i = name.indexOf('@');
2271
            if (i > 0) {
2272
                // Zero so we don't leave a zero length name
2273
                name = name.substring(0, i);
2274
            }
2275
        }
2276
2277
        return getPrincipal(name, gssCredential);
2278
    }
2279
2263
    @Override
2280
    @Override
2264
    protected Principal getPrincipal(String username,
2281
    protected Principal getPrincipal(String username,
2265
            GSSCredential gssCredential) {
2282
            GSSCredential gssCredential) {
(-)a/java/org/apache/catalina/realm/RealmBase.java (-1 / +2 lines)
Lines 1269-1275 public abstract class RealmBase extends LifecycleMBeanBase implements org.apache Link Here
1269
     * @param gssCredential the GSS credential of the principal
1269
     * @param gssCredential the GSS credential of the principal
1270
     * @return the principal associated with the given user name.
1270
     * @return the principal associated with the given user name.
1271
     */
1271
     */
1272
    protected Principal getPrincipal(GSSName gssName, GSSCredential gssCredential) {
1272
    protected Principal getPrincipal(GSSName gssName,
1273
            GSSCredential gssCredential) {
1273
        String name = gssName.toString();
1274
        String name = gssName.toString();
1274
1275
1275
        if (isStripRealmForGss()) {
1276
        if (isStripRealmForGss()) {

Return to bug 64011