本文整理汇总了Java中org.opensaml.saml1.core.SubjectConfirmation类的典型用法代码示例。如果您正苦于以下问题:Java SubjectConfirmation类的具体用法?Java SubjectConfirmation怎么用?Java SubjectConfirmation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SubjectConfirmation类属于org.opensaml.saml1.core包,在下文中一共展示了SubjectConfirmation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:13,代码来源:Saml10SuccessResponseView.java
示例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);
}
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:SubjectUnmarshaller.java
示例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);
}
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:SubjectConfirmationUnmarshaller.java
示例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);
}
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:13,代码来源:SubjectConfirmationUnmarshaller.java
示例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));
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:12,代码来源:SubjectSchemaTest.java
示例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));
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:10,代码来源:SubjectConfirmationSchemaTest.java
示例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);
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:12,代码来源:SubjectConfirmationTest.java
示例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());
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:10,代码来源:SubjectConfirmationTest.java
示例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());
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:10,代码来源:SubjectConfirmationTest.java
示例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);
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:14,代码来源:SubjectConfirmationTest.java
示例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);
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:13,代码来源:SubjectTest.java
示例12: validate
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void validate(SubjectConfirmation subjectConfirmation) throws ValidationException {
validateSubjectConfirmationMethods(subjectConfirmation);
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:SubjectConfirmationSchemaValidator.java
示例13: getSubjectConfirmation
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public SubjectConfirmation getSubjectConfirmation() {
return subjectConfirmation;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:SubjectImpl.java
示例14: setSubjectConfirmation
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** {@inheritDoc} */
public void setSubjectConfirmation(SubjectConfirmation subjectConfirmation) throws IllegalArgumentException {
this.subjectConfirmation = prepareForAssignment(this.subjectConfirmation, subjectConfirmation);
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:SubjectImpl.java
示例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);
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:SubjectConfirmationBuilder.java
示例16: createStatement
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
@Override
public void createStatement(GenericIdentityProviderData ipData, RahasData rahasData)
throws IdentityProviderException {
if (log.isDebugEnabled()) {
log.debug("Begin SAML statement creation.");
}
attributeStmt = (AttributeStatement) buildXMLObject(AttributeStatement.DEFAULT_ELEMENT_NAME);
Subject subject = (Subject) buildXMLObject(Subject.DEFAULT_ELEMENT_NAME);
SubjectConfirmation subjectConf =
(SubjectConfirmation) buildXMLObject(SubjectConfirmation.DEFAULT_ELEMENT_NAME);
ConfirmationMethod confMethod = (ConfirmationMethod) buildXMLObject(ConfirmationMethod.DEFAULT_ELEMENT_NAME);
confMethod.setConfirmationMethod(CONF_KEY);
subjectConf.getConfirmationMethods().add(confMethod);
subject.setSubjectConfirmation(subjectConf);
attributeStmt.setSubject(subject);
Map<String, RequestedClaimData> mapClaims = ipData.getRequestedClaims();
if (rahasData.getAppliesToAddress() != null) {
appilesTo = rahasData.getAppliesToAddress();
}
Iterator<RequestedClaimData> ite = mapClaims.values().iterator();
while (ite.hasNext()) {
RequestedClaimData claim = ite.next();
String uri = claim.getUri();
int index = uri.lastIndexOf("/");
String attrName = uri.substring(index + 1, uri.length());
String attrNamespace = uri.substring(0, index);
Attribute attribute = (Attribute) buildXMLObject(Attribute.DEFAULT_ELEMENT_NAME);
attribute.setAttributeName(attrName);
attribute.setAttributeNamespace(attrNamespace);
XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
XSStringBuilder attributeValueBuilder = (XSStringBuilder) builderFactory.getBuilder(XSString.TYPE_NAME);
XSString stringValue =
attributeValueBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);
stringValue.setValue(claim.getValue());
attribute.getAttributeValues().add(stringValue);
attributeStmt.getAttributes().add(attribute);
}
}
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:50,代码来源:SAML1TokenBuilder.java
示例17: SubjectConfirmationUnmarshaller
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/**
* Constructor
*/
public SubjectConfirmationUnmarshaller() {
super(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME);
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:SubjectConfirmationUnmarshaller.java
示例18: SubjectConfirmationMarshaller
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/**
* Constructor
*/
public SubjectConfirmationMarshaller() {
super(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME);
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:SubjectConfirmationMarshaller.java
示例19: SubjectConfirmationSchemaTest
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
/** Constructor */
public SubjectConfirmationSchemaTest() {
super();
targetQName = new QName(SAMLConstants.SAML1_NS, SubjectConfirmation.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
validator = new SubjectConfirmationSchemaValidator();
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:SubjectConfirmationSchemaTest.java
示例20: testMissingConfirmationMethod
import org.opensaml.saml1.core.SubjectConfirmation; //导入依赖的package包/类
public void testMissingConfirmationMethod(){
SubjectConfirmation subjectConfirmation = (SubjectConfirmation) target;
subjectConfirmation.getConfirmationMethods().clear();
assertValidationFail("No Confirmation methods - should fail");
}
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:SubjectConfirmationSchemaTest.java
注:本文中的org.opensaml.saml1.core.SubjectConfirmation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论