integration-impl/src/main/java/se/idsec/signservice/integration/dss/DssUtils.java
public static List<SignerIdentityAttributeValue> fromAttributeStatement(@Nonnull final AttributeStatement attributeStatement)
      throws SignServiceProtocolException {

    final org.opensaml.saml.saml2.core.AttributeStatement openSaml =
        DssUtils.toOpenSAML(attributeStatement, org.opensaml.saml.saml2.core.AttributeStatement.class);

    List<SignerIdentityAttributeValue> list = new ArrayList<>();
    for (org.opensaml.saml.saml2.core.Attribute a : openSaml.getAttributes()) {
      AttributeUtils.getAttributeStringValues(a).stream()
        .map(v -> SignerIdentityAttributeValue.builder()
          .type(SignerIdentityAttribute.SAML_TYPE)
          .name(a.getName())
          .nameFormat(a.getNameFormat())
          .value(v)
          .build())
        .forEach(av -> list.add(av));
    }

    return list;
  }
/**
   * Converts from an {@code AttributeStatement} object to a list of {@code SignerIdentityAttributeValue} objects.
   * 
   * @param attributeStatement
   *          the statement to convert
   * @return a list of SignerIdentityAttributeValue objects
   * @throws SignServiceProtocolException
   *           for unmarshalling errors
   */
Converts from an  AttributeStatement object to a list of  SignerIdentityAttributeValue objects.

@param attributeStatement
the statement to convert
@return a list of SignerIdentityAttributeValue objects
@throws SignServiceProtocolException
for unmarshalling errors
Converts from an AttributeStatement object to a list of SignerIdentityAttributeValue objects . @param attributeStatement the statement to convert @return a list of SignerIdentityAttributeValue objects @throws SignServiceProtocolException for unmarshalling errors
public static List<SignerIdentityAttributeValue> fromAttributeStatement(@Nonnull final AttributeStatement attributeStatement)
      throws SignServiceProtocolException {
    final org.opensaml.saml.saml2.core.AttributeStatement openSaml =
        DssUtils.toOpenSAML(attributeStatement, org.opensaml.saml.saml2.core.AttributeStatement.class);
    List<SignerIdentityAttributeValue> list = new ArrayList<>();
    for (org.opensaml.saml.saml2.core.Attribute a : openSaml.getAttributes()) {
      AttributeUtils.getAttributeStringValues(a).stream()
        .map(v -> SignerIdentityAttributeValue.builder()
          .type(SignerIdentityAttribute.SAML_TYPE)
          .name(a.getName())
          .nameFormat(a.getNameFormat())
          .value(v)
          .build())
        .forEach(av -> list.add(av));
    }
    return list;
  }
public static List < SignerIdentityAttributeValue > fromAttributeStatement ( @ Nonnull final AttributeStatement attributeStatement ) throws SignServiceProtocolException { final org . opensaml . saml . saml2 . core . AttributeStatement openSaml = DssUtils . toOpenSAML ( attributeStatement , org . opensaml . saml . saml2 . core . AttributeStatement . class ) ; List < SignerIdentityAttributeValue > list = new ArrayList < > ( ) ; for ( org . opensaml . saml . saml2 . core . Attribute a : openSaml . getAttributes ( ) ) { AttributeUtils . getAttributeStringValues ( a ) . stream ( ) . map ( v -> SignerIdentityAttributeValue . builder ( ) . type ( SignerIdentityAttribute . SAML_TYPE ) . name ( a . getName ( ) ) . nameFormat ( a . getNameFormat ( ) ) . value ( v ) . build ( ) ) . forEach ( av -> list . add ( av ) ) ; } return list ; }
Converts from an {@code AttributeStatement} object to a list of {@code SignerIdentityAttributeValue} objects.
Converts from an { @code AttributeStatement } object to a list of { @code SignerIdentityAttributeValue } objects .