Package org.picketlink.identity.federation.core.parsers.sts

Examples of org.picketlink.identity.federation.core.parsers.sts.STSConfigParser


            } else if (SAMLConfigParser.HANDLERS.equals(tag)) {
                SAMLConfigParser samlConfigParser = new SAMLConfigParser();
                Handlers handlers = (Handlers) samlConfigParser.parse(xmlEventReader);
                picketLinkType.setHandlers(handlers);
            } else if (STSConfigParser.ROOT_ELEMENT.equals(tag)) {
                STSConfigParser samlConfigParser = new STSConfigParser();
                STSType sts = (STSType) samlConfigParser.parse(xmlEventReader);
                picketLinkType.setStsType(sts);
            }
            startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
            if (startElement == null)
                break;
View Full Code Here


                    }
                }
            }

            InputStream stream = configurationFileURL.openStream();
            STSType stsConfig = (STSType) new STSConfigParser().parse(stream);
            STSConfiguration configuration = new PicketLinkSTSConfiguration(stsConfig);

            logger.stsConfigurationFileLoaded(fileName);
           
            return configuration;
View Full Code Here

                logger.stsUsingDefaultConfiguration("");
                return new PicketLinkSTSConfiguration();
            }

            InputStream stream = configurationFileURL.openStream();
            STSType stsConfig = (STSType) new STSConfigParser().parse(stream);
            STSConfiguration configuration = new PicketLinkSTSConfiguration(stsConfig);
            if (logger.isInfoEnabled())
                logger.stsConfigurationFileLoaded(STS_CONFIG_FILE);
            return configuration;
        } catch (Exception e) {
View Full Code Here

    @Test
    public void testUseKeyViaSecondaryParameters() throws Exception {
        ClassLoader cl = getClass().getClassLoader();

        InputStream configStream = cl.getResourceAsStream("sts/picketlink-sts.xml");
        STSConfigParser configParser = new STSConfigParser();
        STSType stsType = (STSType) configParser.parse(configStream);

        STSConfiguration config = new PicketLinkSTSConfiguration(stsType);
        WSTrustServiceFactory factory = WSTrustServiceFactory.getInstance();

        // tests the creation of the request handler.
View Full Code Here

    public void testSTSConfiguration() throws Exception {
        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        InputStream configStream = tcl.getResourceAsStream("parser/config/picketlink-sts.xml");

        // parse the test configuration file.
        STSConfigParser parser = new STSConfigParser();
        STSType stsType = (STSType) parser.parse(configStream);

        // check if the STS attributes have been correctly set, including the ones with default values.
        assertEquals("PicketLinkSTS", stsType.getSTSName());
        assertEquals(7200, stsType.getTokenTimeout());
        assertEquals(1000, stsType.getClockSkew());
View Full Code Here

    public void test04() throws Exception {
        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        InputStream is = tcl.getResourceAsStream(this.config + "4.xml");
        assertNotNull("Inputstream not null for config file:" + this.config + "4.xml", is);

        STSConfigParser parser = new STSConfigParser();

        Object object = parser.parse(is);
        assertNotNull("Found a null STS configuration", object);

        STSType stsType = (STSType) object;
        // general STS configurations.
        assertEquals("Unexpected STS name", "Test STS", stsType.getSTSName());
View Full Code Here

            InputStream stream;
            try {
                URL configURL = Thread.currentThread().getContextClassLoader().getResource(configFileName);
                stream = configURL.openStream();

                STSType stsConfig = (STSType) new STSConfigParser().parse(stream);
                return new PicketLinkSTSConfiguration(stsConfig);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.core.parsers.sts.STSConfigParser

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.