本文整理汇总了Java中org.opensaml.saml2.core.SubjectConfirmationData.getInResponseTo方法的典型用法代码示例。如果您正苦于以下问题:Java SubjectConfirmationData.getInResponseTo方法的具体用法?Java SubjectConfirmationData.getInResponseTo怎么用?Java SubjectConfirmationData.getInResponseTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensaml.saml2.core.SubjectConfirmationData
的用法示例。
在下文中一共展示了SubjectConfirmationData.getInResponseTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSingleElementOptionalAttributesUnmarshall
import org.opensaml.saml2.core.SubjectConfirmationData; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesUnmarshall() {
SubjectConfirmationData subjectCD = (SubjectConfirmationData) unmarshallElement(singleElementOptionalAttributesFile);
DateTime notBefore = subjectCD.getNotBefore();
assertEquals("NotBefore was " + notBefore + ", expected " + expectedNotBefore, expectedNotBefore, notBefore);
DateTime notOnOrAfter = subjectCD.getNotOnOrAfter();
assertEquals("NotOnOrAfter was " + notOnOrAfter + ", expected " + expectedNotOnOrAfter, expectedNotOnOrAfter,
notOnOrAfter);
String recipient = subjectCD.getRecipient();
assertEquals("Recipient was " + recipient + ", expected " + expectedRecipient, expectedRecipient, recipient);
String inResponseTo = subjectCD.getInResponseTo();
assertEquals("InResponseTo was " + inResponseTo + ", expected " + expectedInResponseTo, expectedInResponseTo,
inResponseTo);
String address = subjectCD.getAddress();
assertEquals("Address was " + address + ", expected " + expectedAddress, expectedAddress, address);
}
示例2: marshallAttributes
import org.opensaml.saml2.core.SubjectConfirmationData; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
SubjectConfirmationData subjectCD = (SubjectConfirmationData) samlObject;
if (subjectCD.getNotBefore() != null) {
String notBeforeStr = Configuration.getSAMLDateFormatter().print(subjectCD.getNotBefore());
domElement.setAttributeNS(null, SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME, notBeforeStr);
}
if (subjectCD.getNotOnOrAfter() != null) {
String notOnOrAfterStr = Configuration.getSAMLDateFormatter().print(subjectCD.getNotOnOrAfter());
domElement.setAttributeNS(null, SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME, notOnOrAfterStr);
}
if (subjectCD.getRecipient() != null) {
domElement.setAttributeNS(null, SubjectConfirmationData.RECIPIENT_ATTRIB_NAME, subjectCD.getRecipient());
}
if (subjectCD.getInResponseTo() != null) {
domElement.setAttributeNS(null, SubjectConfirmationData.IN_RESPONSE_TO_ATTRIB_NAME, subjectCD
.getInResponseTo());
}
if (subjectCD.getAddress() != null) {
domElement.setAttributeNS(null, SubjectConfirmationData.ADDRESS_ATTRIB_NAME, subjectCD.getAddress());
}
Attr attribute;
for (Entry<QName, String> entry : subjectCD.getUnknownAttributes().entrySet()) {
attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
attribute.setValue(entry.getValue());
domElement.setAttributeNodeNS(attribute);
if (Configuration.isIDAttribute(entry.getKey())
|| subjectCD.getUnknownAttributes().isIDAttribute(entry.getKey())) {
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
}
}
}