@staticmethod<EOL><INDENT>def __build_sign_query(saml_data, relay_state, algorithm, saml_type, lowercase_urlencoding=False):<DEDENT>
sign_data = ['<STR_LIT>' % (saml_type, OneLogin_Saml2_Utils.escape_url(saml_data, lowercase_urlencoding))]<EOL>if relay_state is not None:<EOL><INDENT>sign_data.append('<STR_LIT>' % OneLogin_Saml2_Utils.escape_url(relay_state, lowercase_urlencoding))<EOL><DEDENT>sign_data.append('<STR_LIT>' % OneLogin_Saml2_Utils.escape_url(algorithm, lowercase_urlencoding))<EOL>return '<STR_LIT:&>'.join(sign_data)<EOL>
Build sign query

:param saml_data: The Request data
:type saml_data: str

:param relay_state: The Relay State
:type relay_state: str

:param algorithm: The Signature Algorithm
:type algorithm: str

:param saml_type: The target URL the user should be redirected to
:type saml_type: string  SAMLRequest | SAMLResponse

:param lowercase_urlencoding: lowercase or no
:type lowercase_urlencoding: boolean