Examples of KrbConfig


Examples of org.apache.harmony.auth.internal.kerberos.v5.KrbConfig

                                String v = System
                                        .getProperty("java.security.krb5.realm"); //$NON-NLS-1$
                                if (v == null) {
                                    // look in config files
                                    KrbConfig config = null;
                                    try {
                                        config = KrbConfig.getSystemConfig();
                                    } catch (IOException e) {
                                        // ignore
                                    }
                                    if (config != null) {
                                        v = config.getValue("libdefaults", //$NON-NLS-1$
                                                "default_realm"); //$NON-NLS-1$
                                    }
                                }
                                return v;
                            }
View Full Code Here

Examples of org.apache.harmony.auth.internal.kerberos.v5.KrbConfig

    public void test_Ctor() throws IOException {

        File f = new File(Support_Resources
                .getAbsoluteResourcePath("KrbConfigTest.txt"));

        KrbConfig config = new KrbConfig(f);

        assertEquals("MY.REALM", config
                .getValue("libdefaults", "default_realm"));
        assertEquals("true", config.getValue("libdefaults", "dns_lookup_kdc"));

        assertEquals("SYSLOG:INFO", config.getValue("logging", "default"));
        assertEquals("FILE:/var/kdc.log", config.getValue("logging", "kdc"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.