org.opensaml.xml.signature.Signature.getCanonicalizationAlgorithm()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(134)

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

Signature.getCanonicalizationAlgorithm介绍

[英]Gets the canonicalization algorithm used to create the signature content.
[中]获取用于创建签名内容的规范化算法。

代码示例

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

/**
 * Check the canonicalization method.
 * 
 * @param xmlObject the object to be validated
 * @throws ValidationException thrown if object is invalid
 */
protected void validateCanonicalizationMethod(Signature xmlObject) throws ValidationException {
  if (DatatypeHelper.isEmpty(xmlObject.getCanonicalizationAlgorithm())) {
    throw new ValidationException("The CanonicalizationMethod value was empty");
  }
}

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

/**
 * Check the canonicalization method.
 * 
 * @param xmlObject the object to be validated
 * @throws ValidationException thrown if object is invalid
 */
protected void validateCanonicalizationMethod(Signature xmlObject) throws ValidationException {
  if (DatatypeHelper.isEmpty(xmlObject.getCanonicalizationAlgorithm())) {
    throw new ValidationException("The CanonicalizationMethod value was empty");
  }
}

代码示例来源:origin: usnistgov/iheos-toolkit2

private static void extractSignatureInfo(Assertion assertion, AssertionType assertOut) {
  SamlSignatureType samlSignature = assertOut.getSamlSignature() ;
  SamlSignatureKeyInfoType samlSignatureKeyInfoType = samlSignature.getKeyInfo() ;
  byte []signatureValue = samlSignature.getSignatureValue();
  samlSignature.getKeyInfo().getRsaKeyValueExponent();
  samlSignature.getKeyInfo().getRsaKeyValueModulus() ;
  
  Signature signature = assertion.getSignature() ;
  assertion.getSignature().getCanonicalizationAlgorithm();
  signature.getSignatureAlgorithm();
  List<ContentReference> contentReference1 = signature.getContentReferences();
  
  ContentReference contentReference = (ContentReference)contentReference1.get(0);
  signature.getSigningCredential().getPublicKey().getAlgorithm();
  
  //signature.getSigningCredential().
  
  
}
private static String getSubjectNameIDValue(Assertion assertion) {

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

if (signature.getHMACOutputLength() != null && SecurityHelper.isHMAC(signature.getSignatureAlgorithm())) {
  dsig = new XMLSignature(document, "", signature.getSignatureAlgorithm(), signature
      .getHMACOutputLength(), signature.getCanonicalizationAlgorithm());
} else {
  dsig = new XMLSignature(document, "", signature.getSignatureAlgorithm(), signature
      .getCanonicalizationAlgorithm());

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

if (signature.getHMACOutputLength() != null && SecurityHelper.isHMAC(signature.getSignatureAlgorithm())) {
  dsig = new XMLSignature(document, "", signature.getSignatureAlgorithm(), signature
      .getHMACOutputLength(), signature.getCanonicalizationAlgorithm());
} else {
  dsig = new XMLSignature(document, "", signature.getSignatureAlgorithm(), signature
      .getCanonicalizationAlgorithm());

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

if (signature.getCanonicalizationAlgorithm() == null) {
  signature.setCanonicalizationAlgorithm(secConfig.getSignatureCanonicalizationAlgorithm());

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

if (signature.getCanonicalizationAlgorithm() == null) {
  signature.setCanonicalizationAlgorithm(secConfig.getSignatureCanonicalizationAlgorithm());

相关文章