Package org.opensaml.saml1.core

Examples of org.opensaml.saml1.core.AuthenticationQuery


        assertion.setIssueInstant(new DateTime());

        if (appilesTo != null) {
            Audience audience = (Audience) buildXMLObject(Audience.DEFAULT_ELEMENT_NAME);
            audience.setUri(appilesTo);
            AudienceRestrictionCondition audienceRestrictions = (AudienceRestrictionCondition) buildXMLObject(AudienceRestrictionCondition.DEFAULT_ELEMENT_NAME);
            audienceRestrictions.getAudiences().add(audience);

            conditions.getAudienceRestrictionConditions().add(audienceRestrictions);
        }

        assertion.setConditions(conditions);
View Full Code Here


            }
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(tokenPeriodMinutes));
        }
       
        if (conditionsBean.getAudienceURI() != null) {
            AudienceRestrictionCondition audienceRestriction =
                createSamlv1AudienceRestriction(conditionsBean.getAudienceURI());
            conditions.getAudienceRestrictionConditions().add(audienceRestriction);
        }
       
        return conditions;
View Full Code Here

        if (audienceV1Builder == null) {
            audienceV1Builder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
        Audience audience = audienceV1Builder.buildObject();
        audience.setUri(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

            }
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(tokenPeriodMinutes));
        }
       
        if (conditionsBean.getAudienceURI() != null) {
            AudienceRestrictionCondition audienceRestriction =
                createSamlv1AudienceRestriction(conditionsBean.getAudienceURI());
            conditions.getAudienceRestrictionConditions().add(audienceRestriction);
        }
       
        return conditions;
View Full Code Here

        if (audienceV1Builder == null) {
            audienceV1Builder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
        Audience audience = audienceV1Builder.buildObject();
        audience.setUri(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

*/
public class AuthenticationQueryUnmarshaller extends SubjectQueryUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;

        if (AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())) {
            authenticationQuery.setAuthenticationMethod(attribute.getValue());
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

*/
public class AuthenticationQueryMarshaller extends SubjectQueryMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;

        if (authenticationQuery.getAuthenticationMethod() != null) {
            domElement.setAttributeNS(null, AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME, authenticationQuery
                    .getAuthenticationMethod());
        }
    }
View Full Code Here

        super(SAMLConstants.SAML10P_NS, AuthenticationQuery.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;

        if (authenticationQuery.getAuthenticationMethod() != null) {
            domElement.setAttributeNS(null, AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME,
                    authenticationQuery.getAuthenticationMethod());
        }
    }
View Full Code Here

        super(SAMLConstants.SAML10P_NS, AuthenticationQuery.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;

        if (AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())) {
            authenticationQuery.setAuthenticationMethod(attribute.getValue());
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

                builderFactory.getBuilder(SubjectLocality.DEFAULT_ELEMENT_NAME);
        }

        if (authBeans != null && authBeans.size() > 0) {
            for (AuthenticationStatementBean statementBean : authBeans) {
                AuthenticationStatement authenticationStatement =
                    authenticationStatementV1Builder.buildObject(
                        AuthenticationStatement.DEFAULT_ELEMENT_NAME,
                        AuthenticationStatement.TYPE_NAME
                    );
                Subject authSubject =
                    SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
                authenticationStatement.setSubject(authSubject);

                if (statementBean.getAuthenticationInstant() != null) {
                    authenticationStatement.setAuthenticationInstant(
                        statementBean.getAuthenticationInstant()
                    );
                } else {
                    authenticationStatement.setAuthenticationInstant(new DateTime());
                }

                authenticationStatement.setAuthenticationMethod(
                    transformAuthenticationMethod(statementBean.getAuthenticationMethod())
                );
               
                SubjectLocalityBean subjectLocalityBean = statementBean.getSubjectLocality();
                if (subjectLocalityBean != null) {
                    SubjectLocality subjectLocality = subjectLocalityBuilder.buildObject();
                    subjectLocality.setDNSAddress(subjectLocalityBean.getDnsAddress());
                    subjectLocality.setIPAddress(subjectLocalityBean.getIpAddress());

                    authenticationStatement.setSubjectLocality(subjectLocality);
                }
               
                authenticationStatements.add(authenticationStatement);
            }
        }
View Full Code Here

TOP

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

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.