Package javax.security.auth.login

Examples of javax.security.auth.login.Configuration


        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
    }

    public void testOptionalTrueException() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL, noOptions),
                new AppConfigurationEntry(ExceptionLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
View Full Code Here


        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
    }

    public void testRequiredExceptionTrue() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(ExceptionLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        try {
View Full Code Here

        } catch (LoginException e) {
        }
    }

    public void testRequisiteExceptionTrue() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(ExceptionLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        try {
View Full Code Here

        } catch (LoginException e) {
        }
    }

    public void testRequisiteTrueException() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
                new AppConfigurationEntry(ExceptionLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        try {
View Full Code Here

        } catch (LoginException e) {
        }
    }

    public void testRequiredTrueException() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
                new AppConfigurationEntry(ExceptionLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        try {
View Full Code Here

        } catch (LoginException e) {
        }
    }

    public void testRequiredTrueFalse() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
                new AppConfigurationEntry(FalseLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
View Full Code Here

        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
    }

    public void testRequiredFalseTrue() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(FalseLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
View Full Code Here

        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
    }

    public void testRequisiteTrueFalse() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
                new AppConfigurationEntry(FalseLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
View Full Code Here

        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
    }
   
    public void testRequisiteFalseTrue() throws LoginException {
        Configuration conf = new FixedConfiguration(new AppConfigurationEntry[] {
                new AppConfigurationEntry(FalseLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
                new AppConfigurationEntry(TrueLM.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, noOptions),
        });
        LoginContext lc = new LoginContext("foo", null, null, conf);
        lc.login();
View Full Code Here

     * @return all JAAS-Login Modules for this application or null if none
     */
    private AppConfigurationEntry[] getJAASConfig() {

        // check if jaas-loginModule or fallback is configured
        Configuration logins = null;
        try {
            logins = Configuration.getConfiguration();
        } catch (Exception e) {
            // means no JAAS configuration file OR no permission to read it
        }
        if (logins != null) {
            try {
                return logins.getAppConfigurationEntry(appName);
            } catch (Exception e) {
                // WLP 9.2.0 throws IllegalArgumentException for unknown appName
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of javax.security.auth.login.Configuration

Copyright © 2018 www.massapicom. 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.