gpt4 book ai didi

org.opensaml.xml.schema.XSBase64Binary类的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 11:35:05 28 4
gpt4 key购买 nike

本文整理了Java中org.opensaml.xml.schema.XSBase64Binary类的一些代码示例,展示了XSBase64Binary类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSBase64Binary类的具体详情如下:
包路径:org.opensaml.xml.schema.XSBase64Binary
类名称:XSBase64Binary

XSBase64Binary介绍

[英]XMLObject that represents an XML Schema base64Binary.
[中]表示基于二进制的XML模式的XMLObject。

代码示例

代码示例来源:origin: cloudfoundry/uaa

value = ((XSURI) xmlObject).getValue();
} else if (xmlObject instanceof XSBase64Binary) {
  value = ((XSBase64Binary) xmlObject).getValue();

代码示例来源:origin: org.opensaml/xmltooling

/** {@inheritDoc} */
  protected void processElementContent(XMLObject xmlObject, String elementContent) {
    XSBase64Binary xsBase64Binary = (XSBase64Binary) xmlObject;

    if (elementContent != null) {
      xsBase64Binary.setValue(elementContent.trim());
    }
  }
}

代码示例来源:origin: io.apigee.opensaml/xmltooling

/** {@inheritDoc} */
  protected void processElementContent(XMLObject xmlObject, String elementContent) {
    XSBase64Binary xsBase64Binary = (XSBase64Binary) xmlObject;

    if (elementContent != null) {
      xsBase64Binary.setValue(elementContent.trim());
    }
  }
}

代码示例来源:origin: be.fedict.eid-idp/eid-idp-common-saml2

@SuppressWarnings("unchecked")
private static Attribute getAttribute(String attributeName,
    byte[] attributeValue) {
  Attribute attribute = buildXMLObject(Attribute.class,
      Attribute.DEFAULT_ELEMENT_NAME);
  attribute.setName(attributeName);
  XMLObjectBuilder<XSBase64Binary> builder = Configuration
      .getBuilderFactory().getBuilder(XSBase64Binary.TYPE_NAME);
  XSBase64Binary xmlAttributeValue = builder.buildObject(
      AttributeValue.DEFAULT_ELEMENT_NAME, XSBase64Binary.TYPE_NAME);
  xmlAttributeValue.setValue(Base64.encodeBytes(attributeValue));
  attribute.getAttributeValues().add(xmlAttributeValue);
  return attribute;
}

代码示例来源:origin: org.opensaml/xmltooling

/** {@inheritDoc} */
  protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
    XSBase64Binary xsBase64Binary = (XSBase64Binary) xmlObject;

    XMLHelper.appendTextContent(domElement, xsBase64Binary.getValue());
  }
}

代码示例来源:origin: be.e_contract.sts/sts-client-cxf

private void addAttribute(AttributeStatement attributeStatement,
    Attributes attribute, byte[] value) {
  if (null == value) {
    return;
  }
  XMLObjectBuilder<XSBase64Binary> builder = Configuration
      .getBuilderFactory().getBuilder(XSBase64Binary.TYPE_NAME);
  Attribute samlAttribute = buildXMLObject(Attribute.class,
      Attribute.DEFAULT_ELEMENT_NAME);
  samlAttribute.setName(attribute.getName());
  XSBase64Binary attributeValue = builder.buildObject(
      AttributeValue.DEFAULT_ELEMENT_NAME, XSBase64Binary.TYPE_NAME);
  attributeValue.setValue(Base64.encode(value));
  samlAttribute.getAttributeValues().add(attributeValue);
  attributeStatement.getAttributes().add(samlAttribute);
}

代码示例来源:origin: io.apigee.opensaml/xmltooling

/** {@inheritDoc} */
  protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
    XSBase64Binary xsBase64Binary = (XSBase64Binary) xmlObject;

    XMLHelper.appendTextContent(domElement, xsBase64Binary.getValue());
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

XSBase64Binary ppidValue = ppidValueBuilder.buildObject(
      AttributeValue.DEFAULT_ELEMENT_NAME, XSBase64Binary.TYPE_NAME);
  ppidValue.setValue(claim.getValue());
  attribute.getAttributeValues().add(ppidValue);
} else {

代码示例来源:origin: org.opensaml/xmltooling

/**
 * Validates the content of the XSBase64Binary object.
 * 
 * @param xmlObject the object to evaluate
 * @throws ValidationException thrown if the content of the Base64Binary object is invalid
 */
protected void validateBase64BinaryContent(T xmlObject) throws ValidationException {
  if (! isAllowEmptyContent()) {
    if (DatatypeHelper.isEmpty(xmlObject.getValue())) {
      throw new ValidationException("Base64Binary content may not be empty");
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

XSBase64Binary ppidValue = ppidValueBuilder.buildObject(
      AttributeValue.DEFAULT_ELEMENT_NAME, XSBase64Binary.TYPE_NAME);
  ppidValue.setValue(claim.getValue());
  attribute.getAttributeValues().add(ppidValue);
} else {

代码示例来源:origin: io.apigee.opensaml/xmltooling

/**
 * Validates the content of the XSBase64Binary object.
 * 
 * @param xmlObject the object to evaluate
 * @throws ValidationException thrown if the content of the Base64Binary object is invalid
 */
protected void validateBase64BinaryContent(T xmlObject) throws ValidationException {
  if (! isAllowEmptyContent()) {
    if (DatatypeHelper.isEmpty(xmlObject.getValue())) {
      throw new ValidationException("Base64Binary content may not be empty");
    }
  }
}

代码示例来源:origin: be.fedict.eid-idp/eid-idp-common-saml2

private static void processAttribute(Attribute attribute,
    Map<String, Object> attributeMap)
    throws AssertionValidationException {
  String attributeName = attribute.getName();
  if (attribute.getAttributeValues().get(0) instanceof XSString) {
    XSString attributeValue = (XSString) attribute.getAttributeValues()
        .get(0);
    attributeMap.put(attributeName, attributeValue.getValue());
  } else if (attribute.getAttributeValues().get(0) instanceof XSInteger) {
    XSInteger attributeValue = (XSInteger) attribute
        .getAttributeValues().get(0);
    attributeMap.put(attributeName, attributeValue.getValue());
  } else if (attribute.getAttributeValues().get(0) instanceof XSDateTime) {
    XSDateTime attributeValue = (XSDateTime) attribute
        .getAttributeValues().get(0);
    attributeMap.put(attributeName, attributeValue.getValue()
        .toDateTime(ISOChronology.getInstanceUTC()));
  } else if (attribute.getAttributeValues().get(0) instanceof XSBase64Binary) {
    XSBase64Binary attributeValue = (XSBase64Binary) attribute
        .getAttributeValues().get(0);
    attributeMap.put(attributeName,
        Base64.decode(attributeValue.getValue()));
  } else {
    throw new AssertionValidationException("Unsupported attribute of "
        + "type: "
        + attribute.getAttributeValues().get(0).getClass()
            .getName());
  }
}

代码示例来源:origin: edu.internet2.middleware/shibboleth-common

toMatch = ((XSBase64Binary) xmlObj).getValue();
} else if (xmlObj instanceof XSAny) {
  final XSAny wc = (XSAny) xmlObj;

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com