Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

Problem with FillClaimsForEntity method

$
0
0

Hi,

   I would like do some modification of user claims where is logged in sharepoint, I mean changed display name format. I've create custom claims provider and it works fine but I would change that display name for user. So I try to used method FillClaimsForEntity() but it doesn't work. I can't debug and any changes I did there doesn't work - I don't get another claim for user as I see in Claims Viewer.

How can I debug this ? or why this code doesn't work:

protected override void FillClaimsForEntity(System.Uri context, SPClaim entity, List<SPClaim> claims)
    {
        if (entity == null) throw new ArgumentException("entity");
        if (claims == null) throw new ArgumentException("claims");

        string userName = entity.Value;

        SPClaim classificationClaim = CreateClaim(AudienceClaimType1, entity.Value, StringTypeClaim);

        claims.Add(classificationClaim);

}

Where

AudienceClaimType1 - "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"

now format looks like this:

07.t|sts|user1

I woule like to get just "user1"

Thanx for any help.




Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>