<commit_before><?php

namespace aurora\saml;

use aurora\util\uuid;


class authnrequest
{
	public static function encode($acsUrl, $issuer)
	{
		$now = gmdate("Y-m-d\TH:i:s\Z");
		$id  = uuid::v4();

		return <<<XML
<samlp:AuthnRequest
 AssertionConsumerServiceURL="$acsUrl"
 ID="$id"
 IssueInstant="$now"
 Version="2.0"
 xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
 xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer>$issuer</saml:Issuer>
<samlp:NameIDPolicy
 AllowCreate="true"
 Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"/>
</samlp:AuthnRequest><commit_msg>saml: authn request ID should not start with a number<commit_after><?php

namespace aurora\saml;

use aurora\util\uuid;


class authnrequest
{
	public static function encode($acsUrl, $issuer)
	{
		$now = gmdate("Y-m-d\TH:i:s\Z");
		$id  = uuid::v4();

		return <<<XML
<samlp:AuthnRequest
 AssertionConsumerServiceURL="$acsUrl"
 ID="_$id"
 IssueInstant="$now"
 Version="2.0"
 xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
 xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer>$issuer</saml:Issuer>
<samlp:NameIDPolicy
 AllowCreate="true"
 Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"/>
</samlp:AuthnRequest>
{'fraction_non_alphanumeric': 0.18101367658889783, 'fraction_numerical': 0.014481094127111826, 'mean_word_length': 7.293333333333333, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4081428', 'n_tokens_mistral': 527, 'n_tokens_neox': 516, 'n_words': 68}