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


Write a LogoutRequestType to stream @param logOutRequest
public void write(LogoutRequestType logOutRequest) throws ProcessingException {
        StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.LOGOUT_REQUEST.get(), PROTOCOL_NSURI.get());
        StaxUtil.writeNameSpace(writer, PROTOCOL_PREFIX, PROTOCOL_NSURI.get());
        StaxUtil.writeDefaultNameSpace(writer, ASSERTION_NSURI.get());
        StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), logOutRequest.getID());
        StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), logOutRequest.getVersion());
        StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), logOutRequest.getIssueInstant().toString());
        URI destination = logOutRequest.getDestination();
        if (destination != null) {
            StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString());
        }
        String consent = logOutRequest.getConsent();
        if (StringUtil.isNotNull(consent))
            StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent);
        NameIDType issuer = logOutRequest.getIssuer();
        write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
        Element signature = logOutRequest.getSignature();
        if (signature != null) {
            StaxUtil.writeDOMElement(writer, signature);
        }
        NameIDType nameID = logOutRequest.getNameID();
        if (nameID != null) {
            write(nameID, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.NAMEID.get(), ASSERTION_PREFIX));
        }
        List<String> sessionIndexes = logOutRequest.getSessionIndex();
        for (String sessionIndex : sessionIndexes) {
            StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.SESSION_INDEX.get(), PROTOCOL_NSURI.get());
            StaxUtil.writeCharacters(writer, sessionIndex);
            StaxUtil.writeEndElement(writer);
            StaxUtil.flush(writer);
        }
        StaxUtil.writeEndElement(writer);
        StaxUtil.flush(writer);
    }
public void write ( LogoutRequestType logOutRequest ) throws ProcessingException { StaxUtil . writeStartElement ( writer , PROTOCOL_PREFIX , JBossSAMLConstants . LOGOUT_REQUEST . get ( ) , PROTOCOL_NSURI . get ( ) ) ; StaxUtil . writeNameSpace ( writer , PROTOCOL_PREFIX , PROTOCOL_NSURI . get ( ) ) ; StaxUtil . writeDefaultNameSpace ( writer , ASSERTION_NSURI . get ( ) ) ; StaxUtil . writeAttribute ( writer , JBossSAMLConstants . ID . get ( ) , logOutRequest . getID ( ) ) ; StaxUtil . writeAttribute ( writer , JBossSAMLConstants . VERSION . get ( ) , logOutRequest . getVersion ( ) ) ; StaxUtil . writeAttribute ( writer , JBossSAMLConstants . ISSUE_INSTANT . get ( ) , logOutRequest . getIssueInstant ( ) . toString ( ) ) ; URI destination = logOutRequest . getDestination ( ) ; if ( destination != null ) { StaxUtil . writeAttribute ( writer , JBossSAMLConstants . DESTINATION . get ( ) , destination . toASCIIString ( ) ) ; } String consent = logOutRequest . getConsent ( ) ; if ( StringUtil . isNotNull ( consent ) ) StaxUtil . writeAttribute ( writer , JBossSAMLConstants . CONSENT . get ( ) , consent ) ; NameIDType issuer = logOutRequest . getIssuer ( ) ; write ( issuer , new QName ( ASSERTION_NSURI . get ( ) , JBossSAMLConstants . ISSUER . get ( ) , ASSERTION_PREFIX ) ) ; Element signature = logOutRequest . getSignature ( ) ; if ( signature != null ) { StaxUtil . writeDOMElement ( writer , signature ) ; } NameIDType nameID = logOutRequest . getNameID ( ) ; if ( nameID != null ) { write ( nameID , new QName ( ASSERTION_NSURI . get ( ) , JBossSAMLConstants . NAMEID . get ( ) , ASSERTION_PREFIX ) ) ; } List < String > sessionIndexes = logOutRequest . getSessionIndex ( ) ; for ( String sessionIndex : sessionIndexes ) { StaxUtil . writeStartElement ( writer , PROTOCOL_PREFIX , JBossSAMLConstants . SESSION_INDEX . get ( ) , PROTOCOL_NSURI . get ( ) ) ; StaxUtil . writeCharacters ( writer , sessionIndex ) ; StaxUtil . writeEndElement ( writer ) ; StaxUtil . flush ( writer ) ; } StaxUtil . writeEndElement ( writer ) ; StaxUtil . flush ( writer ) ; }
Write a {@code LogoutRequestType} to stream
 @param logOutRequest
Write a { @code LogoutRequestType } to stream @param logOutRequest
// Attributes