Package org.apache.airavata.security.configurations

Examples of org.apache.airavata.security.configurations.AuthenticatorConfigurationReader


    protected AuthenticatorConfigurationReader authenticatorConfigurationReader;

    @Before
    public void setUp() throws Exception {

        authenticatorConfigurationReader = new AuthenticatorConfigurationReader();
        authenticatorConfigurationReader.init(this.getClass().getClassLoader()
                .getResourceAsStream("authenticators.xml"));

        List<Authenticator> listAuthenticators = authenticatorConfigurationReader.getAuthenticatorList();
View Full Code Here


            String msg = "Invalid authenticator configuration. Cannot read file - ".concat(authenticatorConfiguration);
            log.error(msg);
            throw new ServletException(msg);
        }

        AuthenticatorConfigurationReader authenticatorConfigurationReader
                = new AuthenticatorConfigurationReader();
        try {
            authenticatorConfigurationReader.init(configurationFileStream);
        } catch (IOException e) {
            String msg = "Error reading authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } catch (ParserConfigurationException e) {
            String msg = "Error parsing authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } catch (SAXException e) {
            String msg = "Error parsing authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } finally {
            try {
                configurationFileStream.close();
            } catch (IOException e) {
                log.error("Error closing authenticator file stream.", e);
            }
        }

        this.authenticatorList = authenticatorConfigurationReader.getAuthenticatorList();

        if (this.authenticatorList.isEmpty()) {
            String msg = "No authenticators registered in the system. System cannot function without authenticators";
            log.error(msg);
            throw new ServletException(msg);
View Full Code Here

            String msg = "Invalid authenticator configuration. Cannot read file - ".concat(authenticatorConfiguration);
            log.error(msg);
            throw new ServletException(msg);
        }

        AuthenticatorConfigurationReader authenticatorConfigurationReader
                = new AuthenticatorConfigurationReader();
        try {
            authenticatorConfigurationReader.init(configurationFileStream);
        } catch (IOException e) {
            String msg = "Error reading authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } catch (ParserConfigurationException e) {
            String msg = "Error parsing authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } catch (SAXException e) {
            String msg = "Error parsing authenticator configurations.";

            log.error(msg, e);
            throw new ServletException(msg, e);
        } finally {
            try {
                configurationFileStream.close();
            } catch (IOException e) {
                log.error("Error closing authenticator file stream.", e);
            }
        }

        this.authenticatorList = authenticatorConfigurationReader.getAuthenticatorList();

        if (this.authenticatorList.isEmpty()) {
            String msg = "No authenticators registered in the system. System cannot function without authenticators";
            log.error(msg);
            throw new ServletException(msg);
View Full Code Here

TOP

Related Classes of org.apache.airavata.security.configurations.AuthenticatorConfigurationReader

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.