當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。