Making Attribute Lowercase

McKean, Brandon Scott - mckeanbs mckeanbs at jmu.edu
Tue Sep 26 17:02:59 EDT 2017


Ok, is something like this instead would be safer?


var value = cn.getNativeAttribute().getValues();
value = value[0];
value = value.getValue();
lcn.addValue(value.toLowerCase());

As far as I can tell I'm using methods that are safe to assume are there.


--
Brandon McKean
IT / Systems
Linux Administrator
(540)568-4235


________________________________
From: users <users-bounces at shibboleth.net> on behalf of Cantor, Scott <cantor.2 at osu.edu>
Sent: Tuesday, September 26, 2017 4:17:02 PM
To: Shib Users
Subject: Re: Making Attribute Lowercase

On 9/26/17, 4:11 PM, "users on behalf of McKean, Brandon Scott - mckeanbs" <users-bounces at shibboleth.net on behalf of mckeanbs at jmu.edu> wrote:

> Is that the sort of approach you're referring to?

Technically that's unsafe because it's depending on the underlying object implementing (probably) List but the actual getValues() method returns Collection, which doesn't itself implement get().

That's why I said using getValues() has limitations whereas getNativeAttribute().getValues() is a List but has other complications to account for.

-- Scott


--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20170926/0faa43fd/attachment.html>


More information about the users mailing list