Package org.opensaml.saml1.core

Examples of org.opensaml.saml1.core.Audience


            if(authReqDTO.isDoSingleLogout()){
                authStmt.setSessionIndex(sessionId);
            }
            samlAssertion.getAuthnStatements().add(authStmt);

            Audience audience = new AudienceBuilder().buildObject();
            audience.setAudienceURI(authReqDTO.getIssuer());
            AudienceRestriction audienceRestriction = new AudienceRestrictionBuilder().buildObject();
            audienceRestriction.getAudiences().add(audience);
            Conditions conditions = new ConditionsBuilder().buildObject();
            conditions.setNotBefore(currentTime);
            conditions.setNotOnOrAfter(notOnOrAfter);
View Full Code Here


            audienceBuilder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
        Audience audience = audienceBuilder.buildObject();
        audience.setAudienceURI(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

            if (audienceBuilder == null) {
                audienceBuilder = (SAMLObjectBuilder<Audience>)
                    builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
            }
            for (String audienceURI : proxyRestrictionBean.getAudienceURIs()) {
                Audience audience = audienceBuilder.buildObject();
                audience.setAudienceURI(audienceURI);
                proxyRestriction.getAudiences().add(audience);
            }
        }
       
        return proxyRestriction;
View Full Code Here

            audienceBuilder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
        Audience audience = audienceBuilder.buildObject();
        audience.setAudienceURI(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

            audienceBuilder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
        Audience audience = audienceBuilder.buildObject();
        audience.setAudienceURI(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

            audienceBuilder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
        Audience audience = audienceBuilder.buildObject();
        audience.setAudienceURI(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

*/
public class AudienceUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        Audience audience = (Audience) samlObject;
        audience.setAudienceURI(elementContent);
    }
View Full Code Here

*/
public class AudienceMarshaller extends AbstractSAMLObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        Audience audience = (Audience) samlObject;
        XMLHelper.appendTextContent(domElement, audience.getAudienceURI());
    }
View Full Code Here

     * as expected.
     */
    @Test
    public void testNonEmptyExisting() {
        Hashtable<String, SAMLObject> storage = new Hashtable<String, SAMLObject>();
        Audience audienceMock = createNiceMock(Audience.class);
        SAMLObject<Audience> audience = new SAMLObject<Audience>(audienceMock);
        storage.put("testKey", audience);
        session = createMock(HttpSession.class);
        expect(session.getId()).andReturn("session123").anyTimes();
        expect(session.getAttribute(SPRING_SAML_STORAGE_KEY)).andReturn(storage);
View Full Code Here

     * it will be accessible until another messages gets retrieved.
     */
    @Test
    public void testInsert() {
        Hashtable<String, SAMLObject> storage = new Hashtable<String, SAMLObject>();
        Audience audienceMock = createNiceMock(Audience.class);
        Assertion assertionMock = createNiceMock(Assertion.class);
        storage.put("testKey", new SAMLObject<Audience>(audienceMock));
        session = createMock(HttpSession.class);
        expect(session.getId()).andReturn("session123").anyTimes();
        expect(session.getAttribute(SPRING_SAML_STORAGE_KEY)).andReturn(storage);
View Full Code Here

TOP

Related Classes of org.opensaml.saml1.core.Audience

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.