Table of Contents

Class ClaimsProfileFiller

Namespace
Arc4u.Security.Principal
Assembly
Arc4u.dll

An IClaimProfileFiller that builds the UserProfile from the claims of a ClaimsIdentity (name, given name, surname, e-mail, user principal name, company, phones, culture and security identifier).

[Export(typeof(IClaimProfileFiller))]
[Shared]
public class ClaimsProfileFiller : IClaimProfileFiller, IProfileFiller
Inheritance
ClaimsProfileFiller
Implements
Inherited Members

Constructors

ClaimsProfileFiller(IOptionsMonitor<SimpleKeyValueSettings>)

Initializes a new instance of the ClaimsProfileFiller class.

public ClaimsProfileFiller(IOptionsMonitor<SimpleKeyValueSettings> domainMapping)

Parameters

domainMapping IOptionsMonitor<SimpleKeyValueSettings>

The options, named DomainMapping, mapping the domain part of a user principal name (or a domain\user name) to a short domain name.

Methods

GetProfile(IIdentity)

Builds the profile of the identity from its claims.

public UserProfile GetProfile(IIdentity identity)

Parameters

identity IIdentity

The identity, which must be a ClaimsIdentity.

Returns

UserProfile

The profile. The account name and the domain are extracted from the user principal name; the culture is the invariant culture when the culture claim is missing, falls back to en-GB when the claim is not a valid culture name, and the security identifier to S-1-0-0 when the sid claim is missing.

Exceptions

ArgumentNullException

identity is null.

NotSupportedException

identity is not a ClaimsIdentity.