Package org.opensaml

Examples of org.opensaml.SAMLAssertion.addStatement()


           
            //create an assertion
            SAMLAssertion authAssertion = new SAMLAssertion();
            authAssertion.setId(this.idProvider.getIdentifier());
            authAssertion.setIssuer(assertingParty);
            authAssertion.addStatement(authStatement);
           
            //create the SAMLResponse           
            authResponse.addAssertion(authAssertion);
         }
         else
View Full Code Here


            if (!authentication.getPrincipal().getAttributes().isEmpty()) {
                final SAMLAttributeStatement attributeStatement = new SAMLAttributeStatement();
   
                attributeStatement.setSubject(getSamlSubject(authentication));
                samlAssertion.addStatement(attributeStatement);

                for (final Entry<String, Object> e : authentication.getPrincipal().getAttributes().entrySet()) {
                    final SAMLAttribute attribute = new SAMLAttribute();
                    attribute.setName(e.getKey());
                    attribute.setNamespace(NAMESPACE);
View Full Code Here

   
                    attributeStatement.addAttribute(attribute);
                }
            }

            samlAssertion.addStatement(samlAuthenticationStatement);
            samlAssertion.addCondition(samlAudienceRestrictionCondition);
            samlResponse.addAssertion(samlAssertion);

            final String xmlResponse = samlResponse.toString();
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.