当前位置: 首页>>代码示例>>Java>>正文


Java AttributeAuthorityDescriptor类代码示例

本文整理汇总了Java中org.opensaml.saml2.metadata.AttributeAuthorityDescriptor的典型用法代码示例。如果您正苦于以下问题:Java AttributeAuthorityDescriptor类的具体用法?Java AttributeAuthorityDescriptor怎么用?Java AttributeAuthorityDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AttributeAuthorityDescriptor类属于org.opensaml.saml2.metadata包,在下文中一共展示了AttributeAuthorityDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processChildElement

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentElement, XMLObject childElement) throws UnmarshallingException {
    AttributeAuthorityDescriptor descriptor = (AttributeAuthorityDescriptor) parentElement;

    if (childElement instanceof AttributeService) {
        descriptor.getAttributeServices().add((AttributeService) childElement);
    } else if (childElement instanceof AssertionIDRequestService) {
        descriptor.getAssertionIDRequestServices().add((AssertionIDRequestService) childElement);
    } else if (childElement instanceof NameIDFormat) {
        descriptor.getNameIDFormats().add((NameIDFormat) childElement);
    } else if (childElement instanceof AttributeProfile) {
        descriptor.getAttributeProfiles().add((AttributeProfile) childElement);
    } else if (childElement instanceof Attribute) {
        descriptor.getAttributes().add((Attribute) childElement);
    } else {
        super.processChildElement(parentElement, childElement);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:AttributeAuthorityDescriptorUnmarshaller.java

示例2: testChildElementsUnmarshall

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsUnmarshall() {
    EntityDescriptor descriptor = (EntityDescriptor) unmarshallElement(childElementsFile);

    assertNotNull("Extensions child", descriptor.getExtensions());
    assertNotNull("Signature child", descriptor.getSignature());
    assertEquals("IDPSSODescriptor count", 2, descriptor.getRoleDescriptors(IDPSSODescriptor.DEFAULT_ELEMENT_NAME).size());
    assertEquals("SPSSODescriptor count", 3, descriptor.getRoleDescriptors(SPSSODescriptor.DEFAULT_ELEMENT_NAME).size());
    assertEquals("AuthnAuthorityDescriptor count", 2, descriptor.getRoleDescriptors(AuthnAuthorityDescriptor.DEFAULT_ELEMENT_NAME).size());
    assertEquals("AttributeAuthorityDescriptor count", 1, descriptor.getRoleDescriptors(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME).size());
    assertEquals("PDPDescriptor count", 2, descriptor.getRoleDescriptors(PDPDescriptor.DEFAULT_ELEMENT_NAME).size());
    assertNotNull("AffiliationDescriptor ", descriptor.getAffiliationDescriptor());
    assertNotNull("Organization ", descriptor.getOrganization());
    assertEquals("ContactPerson count", 1, descriptor.getContactPersons().size());
    assertEquals("AdditionalMetadataLocation count", 3, descriptor.getAdditionalMetadataLocations().size());
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:17,代码来源:EntityDescriptorTest.java

示例3: validateAttributeServices

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/**
 * Checks that at least one AttributeService is present.
 * 
 * @param attributeAuthorityDescriptor
 * @throws ValidationException
 */
protected void validateAttributeServices(AttributeAuthorityDescriptor attributeAuthorityDescriptor)
        throws ValidationException {
    if (attributeAuthorityDescriptor.getAttributeServices() == null
            || attributeAuthorityDescriptor.getAttributeServices().size() == 0) {
        throw new ValidationException("Must have one or more AttributeServices.");
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AttributeAuthorityDescriptorSchemaValidator.java

示例4: getAttributeAuthorityDescriptor

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
public AttributeAuthorityDescriptor getAttributeAuthorityDescriptor(String supportedProtocol) {
    List<RoleDescriptor> descriptors = getRoleDescriptors(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME,
            supportedProtocol);
    if (descriptors.size() > 0) {
        return (AttributeAuthorityDescriptor) descriptors.get(0);
    }

    return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:EntityDescriptorImpl.java

示例5: getAttributeQueryServiceLocation

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
public String getAttributeQueryServiceLocation(String binding) throws IllegalArgumentException {
	AttributeAuthorityDescriptor descriptor = entityDescriptor.getAttributeAuthorityDescriptor(SAMLConstants.SAML20P_NS);
	if (descriptor == null) throw new IllegalArgumentException("Metadata does not contain a AttributeAuthorityDescriptor");
	for (AttributeService service : descriptor.getAttributeServices()) {
		if (binding.equals(service.getBinding())) {
			return service.getLocation();
		}
	}
	throw new IllegalArgumentException("Binding " + binding + " not found in AttributeServices");
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:11,代码来源:IdpMetadata.java

示例6: populateRequiredData

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
    super.populateRequiredData();
    AttributeAuthorityDescriptor attributeAuthorityDescriptor = (AttributeAuthorityDescriptor) target;
    AttributeService attributeService = (AttributeService) buildXMLObject(new QName(SAMLConstants.SAML20MD_NS,
            AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX));
    attributeAuthorityDescriptor.getAttributeServices().add(attributeService);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:9,代码来源:AttributeAuthorityDescriptorSchemaTest.java

示例7: testAttributeServiceFailure

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/**
 * Tests for AttributeService failure.
 * 
 * @throws ValidationException
 */
public void testAttributeServiceFailure() throws ValidationException {
    AttributeAuthorityDescriptor attributeAuthorityDescriptor = (AttributeAuthorityDescriptor) target;

    attributeAuthorityDescriptor.getAttributeServices().clear();
    assertValidationFail("Attribute Services list was empty, should raise Validation Exception");
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:12,代码来源:AttributeAuthorityDescriptorSchemaTest.java

示例8: populateRequiredData

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
    EntityDescriptor entityDescriptor = (EntityDescriptor) target;
    AttributeAuthorityDescriptor attributeAuthorityDescriptor = (AttributeAuthorityDescriptor) buildXMLObject(new QName(
            SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX));
    entityDescriptor.getRoleDescriptors(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME).add(attributeAuthorityDescriptor);
    entityDescriptor.setEntityID("entity id");
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:9,代码来源:EntityDescriptorSchemaTest.java

示例9: testWhiteListIdPRoles

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
public void testWhiteListIdPRoles() throws Exception {
    ArrayList<QName> retainedRoles = new ArrayList<QName>();
    retainedRoles.add(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
    retainedRoles.add(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);

    HTTPMetadataProvider metadataProvider = new HTTPMetadataProvider(inCommonMDURL, 1000 * 5);
    metadataProvider.setParserPool(parser);
    metadataProvider.setMetadataFilter(new EntityRoleFilter(retainedRoles));
    metadataProvider.initialize();

    EntitiesDescriptor descriptor = (EntitiesDescriptor) metadataProvider.getMetadata();
    Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(descriptor);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:14,代码来源:EntityRoleFilterTest.java

示例10: validate

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
public void validate(AttributeAuthorityDescriptor attributeAuthorityDescriptor) throws ValidationException {
    super.validate(attributeAuthorityDescriptor);
    validateAttributeServices(attributeAuthorityDescriptor);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:AttributeAuthorityDescriptorSchemaValidator.java

示例11: buildObject

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** {@inheritDoc} */
public AttributeAuthorityDescriptor buildObject() {
    return buildObject(SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME,
            SAMLConstants.SAML20MD_PREFIX);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:AttributeAuthorityDescriptorBuilder.java

示例12: AttributeAuthorityDescriptorMarshaller

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/**
 * Constructor
 */
public AttributeAuthorityDescriptorMarshaller() {
    super(SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:AttributeAuthorityDescriptorMarshaller.java

示例13: AttributeAuthorityDescriptorUnmarshaller

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/**
 * Constructor
 */
public AttributeAuthorityDescriptorUnmarshaller() {
    super(SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:AttributeAuthorityDescriptorUnmarshaller.java

示例14: AttributeAuthorityDescriptorSchemaTest

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** Constructor */
public AttributeAuthorityDescriptorSchemaTest() {
    targetQName = new QName(SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
    validator = new AttributeAuthorityDescriptorSchemaValidator();
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:6,代码来源:AttributeAuthorityDescriptorSchemaTest.java

示例15: AttributeAuthorityDescriptorSpecTest

import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor; //导入依赖的package包/类
/** Constructor */
public AttributeAuthorityDescriptorSpecTest() {
    targetQName = new QName(SAMLConstants.SAML20MD_NS, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
    validator = new AttributeAuthorityDescriptorSpecValidator();
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:6,代码来源:AttributeAuthorityDescriptorSpecTest.java


注:本文中的org.opensaml.saml2.metadata.AttributeAuthorityDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。