本文整理汇总了Java中org.opensaml.saml1.core.SubjectConfirmation类的典型用法代码示例。如果您正苦于以下问题:Java SubjectConfirmation类的具体用法?Java SubjectConfirmation怎么用?Java SubjectConfirmation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SubjectConfirmation类属于org.opensaml.saml1.core包,在下文中一共展示了SubjectConfirmation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newSubject
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
private Subject newSubject(final String identifier) {
final SubjectConfirmation confirmation = newSamlObject(SubjectConfirmation.class);
final ConfirmationMethod method = newSamlObject(ConfirmationMethod.class);
method.setConfirmationMethod(CONFIRMATION_METHOD);
confirmation.getConfirmationMethods().add(method);
final NameIdentifier nameIdentifier = newSamlObject(NameIdentifier.class);
nameIdentifier.setNameIdentifier(identifier);
final Subject subject = newSamlObject(Subject.class);
subject.setNameIdentifier(nameIdentifier);
subject.setSubjectConfirmation(confirmation);
return subject;
}
示例2: processChildElement
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
Subject subject = (Subject) parentSAMLObject;
if (childSAMLObject instanceof NameIdentifier) {
subject.setNameIdentifier((NameIdentifier) childSAMLObject);
} else if (childSAMLObject instanceof SubjectConfirmation) {
subject.setSubjectConfirmation((SubjectConfirmation) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例3: processChildElement
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) parentSAMLObject;
if (childSAMLObject instanceof ConfirmationMethod) {
subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod) childSAMLObject);
} else if(childSAMLObject instanceof KeyInfo) {
subjectConfirmation.setKeyInfo((KeyInfo)childSAMLObject);
} else {
subjectConfirmation.setSubjectConfirmationData(childSAMLObject);
}
}
示例4: processChildElement
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) parentSAMLObject;
if (childSAMLObject instanceof ConfirmationMethod) {
subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod) childSAMLObject);
} else {
subjectConfirmation.setSubjectConfirmationData(childSAMLObject);
}
}
示例5: populateRequiredData
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
Subject subject = (Subject) target;
QName qname = new QName(SAMLConstants.SAML1_NS, NameIdentifier.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subject.setNameIdentifier((NameIdentifier)buildXMLObject(qname));
qname = new QName(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subject.setSubjectConfirmation((SubjectConfirmation)buildXMLObject(qname));
}
示例6: populateRequiredData
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) target;
QName qname = new QName(SAMLConstants.SAML1_NS, ConfirmationMethod.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod)buildXMLObject(qname));
}
示例7: SubjectConfirmationTest
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/**
* Constructor
*/
public SubjectConfirmationTest() {
super();
singleElementFile = "/data/org/opensaml/saml1/impl/singleSubjectConfirmation.xml";
singleElementOptionalAttributesFile = "/data/org/opensaml/saml1/impl/singleSubjectConfirmation.xml";
fullElementsFile = "/data/org/opensaml/saml1/impl/SubjectConfirmationWithChildren.xml";
qname = new QName(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
}
示例8: testSingleElementUnmarshall
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementUnmarshall() {
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) unmarshallElement(singleElementFile);
assertEquals("Non zero number of child ConfirmationMethods elements", 0, subjectConfirmation
.getConfirmationMethods().size());
assertNull("Non zero number of child SubjectConfirmationData elements", subjectConfirmation
.getSubjectConfirmationData());
}
示例9: testFullElementsUnmarshall
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/**
* Test an XML file with children
*/
public void testFullElementsUnmarshall() {
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) unmarshallElement(fullElementsFile);
assertEquals("Number of ConfirmationMethods", 2, subjectConfirmation.getConfirmationMethods().size());
assertNotNull("Zero child SubjectConfirmationData elements", subjectConfirmation.getSubjectConfirmationData());
}
示例10: testFullElementsMarshall
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
public void testFullElementsMarshall() {
SubjectConfirmation subjectConfirmation = (SubjectConfirmationImpl) buildXMLObject(qname);
QName oqname = new QName(SAMLConstants.SAML1_NS, ConfirmationMethod.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod) buildXMLObject(oqname));
subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod) buildXMLObject(oqname));
XSAnyBuilder proxyBuilder = new XSAnyBuilder();
oqname = new QName(SAMLConstants.SAML1_NS, SubjectConfirmationData.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subjectConfirmation.setSubjectConfirmationData(proxyBuilder.buildObject(oqname));
assertEquals(expectedFullDOM, subjectConfirmation);
}
示例11: testChildElementsMarshall
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
Subject subject = (Subject) buildXMLObject(qname);
QName oqname = new QName(SAMLConstants.SAML1_NS, NameIdentifier.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subject.setNameIdentifier((NameIdentifier) buildXMLObject(oqname));
oqname = new QName(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
subject.setSubjectConfirmation((SubjectConfirmation) buildXMLObject(oqname));
assertEquals(expectedChildElementsDOM, subject);
}
示例12: validate
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void validate(SubjectConfirmation subjectConfirmation) throws ValidationException {
validateSubjectConfirmationMethods(subjectConfirmation);
}
示例13: getSubjectConfirmation
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public SubjectConfirmation getSubjectConfirmation() {
return subjectConfirmation;
}
示例14: setSubjectConfirmation
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void setSubjectConfirmation(SubjectConfirmation subjectConfirmation) throws IllegalArgumentException {
this.subjectConfirmation = prepareForAssignment(this.subjectConfirmation, subjectConfirmation);
}
示例15: buildObject
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public SubjectConfirmation buildObject() {
return buildObject(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
}