saml/saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/writers/SAMLRequestWriter.java
/**
     * Write a {@code NameIDPolicyType} to stream
     *
     * @param nameIDPolicy
     *
     * @throws ProcessingException
     */
Write a  NameIDPolicyType to stream
@param nameIDPolicy


Write a NameIDPolicyType to stream @param nameIDPolicy
public void write(NameIDPolicyType nameIDPolicy) throws ProcessingException {
        StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.NAMEID_POLICY.get(), PROTOCOL_NSURI.get());
        URI format = nameIDPolicy.getFormat();
        if (format != null) {
            StaxUtil.writeAttribute(writer, JBossSAMLConstants.FORMAT.get(), format.toASCIIString());
        }
        String spNameQualifier = nameIDPolicy.getSPNameQualifier();
        if (StringUtil.isNotNull(spNameQualifier)) {
            StaxUtil.writeAttribute(writer, JBossSAMLConstants.SP_NAME_QUALIFIER.get(), spNameQualifier);
        }
        Boolean allowCreate = nameIDPolicy.isAllowCreate();
        if (allowCreate != null) {
            StaxUtil.writeAttribute(writer, JBossSAMLConstants.ALLOW_CREATE.get(), allowCreate.toString());
        }
        StaxUtil.writeEndElement(writer);
        StaxUtil.flush(writer);
    }
public void write ( NameIDPolicyType nameIDPolicy ) throws ProcessingException { StaxUtil . writeStartElement ( writer , PROTOCOL_PREFIX , JBossSAMLConstants . NAMEID_POLICY . get ( ) , PROTOCOL_NSURI . get ( ) ) ; URI format = nameIDPolicy . getFormat ( ) ; if ( format != null ) { StaxUtil . writeAttribute ( writer , JBossSAMLConstants . FORMAT . get ( ) , format . toASCIIString ( ) ) ; } String spNameQualifier = nameIDPolicy . getSPNameQualifier ( ) ; if ( StringUtil . isNotNull ( spNameQualifier ) ) { StaxUtil . writeAttribute ( writer , JBossSAMLConstants . SP_NAME_QUALIFIER . get ( ) , spNameQualifier ) ; } Boolean allowCreate = nameIDPolicy . isAllowCreate ( ) ; if ( allowCreate != null ) { StaxUtil . writeAttribute ( writer , JBossSAMLConstants . ALLOW_CREATE . get ( ) , allowCreate . toString ( ) ) ; } StaxUtil . writeEndElement ( writer ) ; StaxUtil . flush ( writer ) ; }
Write a {@code NameIDPolicyType} to stream
 @param nameIDPolicy
Write a { @code NameIDPolicyType } to stream @param nameIDPolicy