Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include xml:lang attribute in ServiceName and ServiceDescription #224

Merged
merged 1 commit into from
May 21, 2024

Conversation

MartijnVdS
Copy link

@MartijnVdS MartijnVdS commented May 21, 2024

The SAML2 metadata documentation states that these fields are of the localizedNameType type. This means that an xml:lang attribute that indicates which language the text is written in, is required.

This change adds this attribute, with a value of en (just like for md:OrganizationName etc.)

Fixes #223

The SAML2 metadata documentation states that these fields are of the
`localizedNameType` type. This means that an `xml:lang` attribute
that indicates which language the text is written in, is required.

This change adds this attribute, with a value of `en` (just like for
md:OrganizationName etc.)

Fixes perl-net-saml2#223
@@ -66,8 +66,8 @@ sub to_xml {
index => $self->index,
isDefault => $self->default,
},
$xml->ServiceName($self->namespace, undef, $self->service_name),
$self->_has_service_description ? $xml->ServiceDescription($self->namespace, undef, $self->service_description) : (),
$xml->ServiceName($self->namespace, { 'xml:lang' => 'en' }, $self->service_name),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead of hardcoding it to 'en' we can add it as an attribute (and default it to 'en'), so others can define their own language, eg, 'it', 'nl' etc?

@timlegge wdyt?

I could also accept this and change it in another commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we do need a way to specify a language but as @MartijnVdS pointed out it is hard coded in the generate_metadata so lets approve her and add an issue to fix everywhere.

@timlegge timlegge merged commit 0fc0914 into perl-net-saml2:master May 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants