本文整理汇总了Java中org.opensaml.saml2.common.Extensions类的典型用法代码示例。如果您正苦于以下问题:Java Extensions类的具体用法?Java Extensions怎么用?Java Extensions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Extensions类属于org.opensaml.saml2.common包,在下文中一共展示了Extensions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
RoleDescriptor roleDescriptor = (RoleDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
roleDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
roleDescriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof KeyDescriptor) {
roleDescriptor.getKeyDescriptors().add((KeyDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Organization) {
roleDescriptor.setOrganization((Organization) childSAMLObject);
} else if (childSAMLObject instanceof ContactPerson) {
roleDescriptor.getContactPersons().add((ContactPerson) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例2: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
AffiliationDescriptor descriptor = (AffiliationDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
descriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
descriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof AffiliateMember) {
descriptor.getMembers().add((AffiliateMember) childSAMLObject);
} else if (childSAMLObject instanceof KeyDescriptor) {
descriptor.getKeyDescriptors().add((KeyDescriptor) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例3: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
Organization org = (Organization) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
org.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationName) {
org.getOrganizationNames().add((OrganizationName) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationDisplayName) {
org.getDisplayNames().add((OrganizationDisplayName) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationURL) {
org.getURLs().add((OrganizationURL) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例4: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
ContactPerson person = (ContactPerson) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
person.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Company) {
person.setCompany((Company) childSAMLObject);
} else if (childSAMLObject instanceof GivenName) {
person.setGivenName((GivenName) childSAMLObject);
} else if (childSAMLObject instanceof SurName) {
person.setSurName((SurName) childSAMLObject);
} else if (childSAMLObject instanceof EmailAddress) {
person.getEmailAddresses().add((EmailAddress) childSAMLObject);
} else if (childSAMLObject instanceof TelephoneNumber) {
person.getTelephoneNumbers().add((TelephoneNumber) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例5: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entityDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
entityDescriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof RoleDescriptor) {
entityDescriptor.getRoleDescriptors().add((RoleDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof AffiliationDescriptor) {
entityDescriptor.setAffiliationDescriptor((AffiliationDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Organization) {
entityDescriptor.setOrganization((Organization) childSAMLObject);
} else if (childSAMLObject instanceof ContactPerson) {
entityDescriptor.getContactPersons().add((ContactPerson) childSAMLObject);
} else if (childSAMLObject instanceof AdditionalMetadataLocation) {
entityDescriptor.getAdditionalMetadataLocations().add((AdditionalMetadataLocation) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例6: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entitiesDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof EntitiesDescriptor) {
entitiesDescriptor.getEntitiesDescriptors().add((EntitiesDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof EntityDescriptor) {
entitiesDescriptor.getEntityDescriptors().add((EntityDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
entitiesDescriptor.setSignature((Signature) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例7: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
ArtifactResponse artifactResponse = (ArtifactResponse) parentSAMLObject;
if (childSAMLObject instanceof Issuer) {
artifactResponse.setIssuer((Issuer) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
artifactResponse.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof Extensions) {
artifactResponse.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Status) {
artifactResponse.setStatus((Status) childSAMLObject);
} else {
artifactResponse.setMessage((SAMLObject) childSAMLObject);
}
}
示例8: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
StatusResponseType sr = (StatusResponseType) parentSAMLObject;
if (childSAMLObject instanceof Issuer) {
sr.setIssuer((Issuer) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
sr.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof Extensions) {
sr.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Status) {
sr.setStatus((Status) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例9: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entityDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
entityDescriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof RoleDescriptor) {
entityDescriptor.getRoleDescriptors().add((RoleDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof AffiliationDescriptor) {
entityDescriptor.setAffiliationDescriptor((AffiliationDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Organization) {
entityDescriptor.setOrganization((Organization) childSAMLObject);
} else if (childSAMLObject instanceof ContactPerson) {
entityDescriptor.getContactPersons().add((ContactPerson) childSAMLObject);
} else if (childSAMLObject instanceof AdditionalMetadataLocation) {
entityDescriptor.getAdditionalMetadataLocations().add((AdditionalMetadataLocation) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例10: testChildElementsMarshall
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20MD_NS, AffiliationDescriptor.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
AffiliationDescriptor descriptor = (AffiliationDescriptor) buildXMLObject(qname);
descriptor.setOwnerID(expectedOwnerID);
descriptor.setID(expectedID);
descriptor.setSignature( buildSignatureSkeleton() );
QName extensionsQName = new QName(SAMLConstants.SAML20MD_NS, Extensions.LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
descriptor.setExtensions((Extensions) buildXMLObject(extensionsQName));
QName affilMemberQName = new QName(SAMLConstants.SAML20MD_NS, AffiliateMember.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
descriptor.getMembers().add((AffiliateMember) buildXMLObject(affilMemberQName));
descriptor.getMembers().add((AffiliateMember) buildXMLObject(affilMemberQName));
descriptor.getMembers().add((AffiliateMember) buildXMLObject(affilMemberQName));
assertEquals(expectedChildElementsDOM, descriptor);
}
示例11: testChildElementsMarshall
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20MD_NS, EntitiesDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) buildXMLObject(qname);
entitiesDescriptor.setID(expectedID);
entitiesDescriptor.setSignature( buildSignatureSkeleton() );
QName extensionsQName = new QName(SAMLConstants.SAML20MD_NS, Extensions.LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
entitiesDescriptor.setExtensions((Extensions) buildXMLObject(extensionsQName));
QName entitiesDescriptorQName = new QName(SAMLConstants.SAML20MD_NS, EntitiesDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
QName entityDescriptorQName = new QName(SAMLConstants.SAML20MD_NS, EntityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
entitiesDescriptor.getEntitiesDescriptors().add((EntitiesDescriptor) buildXMLObject(entitiesDescriptorQName));
entitiesDescriptor.getEntityDescriptors().add((EntityDescriptor) buildXMLObject(entityDescriptorQName));
entitiesDescriptor.getEntitiesDescriptors().add((EntitiesDescriptor) buildXMLObject(entitiesDescriptorQName));
entitiesDescriptor.getEntityDescriptors().add((EntityDescriptor) buildXMLObject(entityDescriptorQName));
entitiesDescriptor.getEntitiesDescriptors().add((EntitiesDescriptor) buildXMLObject(entitiesDescriptorQName));
assertEquals(expectedChildElementsDOM, entitiesDescriptor);
}
示例12: testChildElementsMarshall
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/**
*
*/
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20MD_NS, Organization.DEFAULT_ELEMENT_LOCAL_NAME);
Organization org = (Organization) buildXMLObject(qname);
QName extensionsQName = new QName(SAMLConstants.SAML20MD_NS, Extensions.LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
org.setExtensions((Extensions) buildXMLObject(extensionsQName));
QName nameQName = new QName(SAMLConstants.SAML20MD_NS, OrganizationName.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
for (int i = 0; i < 3; i++) {
org.getOrganizationNames().add((OrganizationName) buildXMLObject(nameQName));
}
QName displayNameQName = new QName(SAMLConstants.SAML20MD_NS, OrganizationDisplayName.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
for (int i = 0; i < 2; i++) {
org.getDisplayNames().add((OrganizationDisplayName) buildXMLObject(displayNameQName));
}
QName urlQName = new QName(SAMLConstants.SAML20MD_NS, OrganizationURL.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
org.getURLs().add((OrganizationURL) buildXMLObject(urlQName));
assertEquals(expectedChildElementsDOM, org);
}
示例13: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
throws UnmarshallingException {
Extensions extensions = (Extensions) parentXMLObject;
extensions.getUnknownXMLObjects().add(childXMLObject);
}
示例14: processChildElement
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
RequestAbstractType req = (RequestAbstractType) parentSAMLObject;
if (childSAMLObject instanceof Issuer) {
req.setIssuer((Issuer) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
req.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof Extensions) {
req.setExtensions((Extensions) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例15: getSAMLExtensions
import org.opensaml.saml2.common.Extensions; //导入依赖的package包/类
protected Extensions getSAMLExtensions(HttpServletRequest request) {
try {
String samlRequest = request.getParameter(SSOConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ);
if (samlRequest == null) {
samlRequest = (String) request.getAttribute(SSOConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ);
}
if (samlRequest != null) {
XMLObject xmlObject;
if (SSOConstants.HTTP_POST.equals(request.getMethod())) {
xmlObject = unmarshall(SSOUtils.decodeForPost(samlRequest));
} else {
xmlObject = unmarshall(SSOUtils.decode(samlRequest));
}
if (xmlObject instanceof AuthnRequest) {
AuthnRequest authnRequest = (AuthnRequest) xmlObject;
Extensions oldExtensions = authnRequest.getExtensions();
if (oldExtensions != null) {
ExtensionsBuilder extBuilder = new ExtensionsBuilder();
Extensions extensions = extBuilder.buildObject(SAMLConstants.SAML20P_NS,
Extensions.LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
extensions.setDOM(oldExtensions.getDOM());
return extensions;
}
}
}
} catch (Exception e) { // TODO IDENTITY-2421
//ignore
log.debug("Error while loading SAML Extensions", e);
}
return null;
}