#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.UserInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo 'Abblix\.Oidc\.Server\.Features\.UserInfo')

## UserClaimsProvider Class

Handles the retrieval of user claims for authentication sessions, ensuring compliance with requested scopes and
specific claim details\. This class integrates directly with user information providers and scope\-to\-claim mappings
to fetch and validate the necessary user data\. It supports converting user data into claims that adhere to
OpenID Connect standards, tailored to the specific needs of the client making the request\.

```csharp
public class UserClaimsProvider : Abblix.Oidc.Server.Features.UserInfo.IUserClaimsProvider
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → UserClaimsProvider

Implements [IUserClaimsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.IUserClaimsProvider 'Abblix\.Oidc\.Server\.Features\.UserInfo\.IUserClaimsProvider')
### Constructors

## UserClaimsProvider\(ILogger\<UserClaimsProvider\>, IUserInfoProvider, IScopeClaimsProvider, ISubjectTypeConverter\) Constructor {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.UserClaimsProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider_,Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider,Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider,Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter)}

Handles the retrieval of user claims for authentication sessions, ensuring compliance with requested scopes and
specific claim details\. This class integrates directly with user information providers and scope\-to\-claim mappings
to fetch and validate the necessary user data\. It supports converting user data into claims that adhere to
OpenID Connect standards, tailored to the specific needs of the client making the request\.

```csharp
public UserClaimsProvider(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider> logger, Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider userInfoProvider, Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider scopeClaimsProvider, Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter subjectTypeConverter);
```
#### Parameters

###### `logger` [Microsoft\.Extensions\.Logging\.ILogger&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1')[UserClaimsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider 'Abblix\.Oidc\.Server\.Features\.UserInfo\.UserClaimsProvider')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.UserClaimsProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider_,Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider,Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider,Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter).logger}

The logger used for logging information and errors\.

###### `userInfoProvider` [IUserInfoProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider 'Abblix\.Oidc\.Server\.Features\.UserInfo\.IUserInfoProvider') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.UserClaimsProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider_,Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider,Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider,Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter).userInfoProvider}

The provider used to retrieve detailed user information based on specific claims\.

###### `scopeClaimsProvider` [IScopeClaimsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider 'Abblix\.Oidc\.Server\.Features\.UserInfo\.IScopeClaimsProvider') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.UserClaimsProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider_,Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider,Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider,Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter).scopeClaimsProvider}

The provider that maps requested scopes to the corresponding set of claims\.

###### `subjectTypeConverter` [ISubjectTypeConverter](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter 'Abblix\.Oidc\.Server\.Features\.UserInfo\.ISubjectTypeConverter') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.UserClaimsProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider_,Abblix.Oidc.Server.Features.UserInfo.IUserInfoProvider,Abblix.Oidc.Server.Features.UserInfo.IScopeClaimsProvider,Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter).subjectTypeConverter}

The converter used to translate user identifiers into subject types as
            required by different client configurations\.
### Methods

## UserClaimsProvider\.GetUserClaimsAsync\(AuthSession, ICollection\<string\>, ICollection\<KeyValuePair\<string,RequestedClaimDetails\>\>, ClientInfo\) Method {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo)}

Asynchronously retrieves structured user claims based on an authentication session and specific claim parameters\.
This method ensures compliance with the OpenID Connect standards by validating essential claims and formatting
the user data into a structured JSON object\.

```csharp
public System.Threading.Tasks.Task<System.Text.Json.Nodes.JsonObject?> GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession authSession, System.Collections.Generic.ICollection<string> scope, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,Abblix.Oidc.Server.Model.RequestedClaimDetails>>? requestedClaims, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);
```
#### Parameters

###### `authSession` [AuthSession](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserAuthentication.AuthSession 'Abblix\.Oidc\.Server\.Features\.UserAuthentication\.AuthSession') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).authSession}

The authentication session providing the context for user claims retrieval\.

###### `scope` [System\.Collections\.Generic\.ICollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1 'System\.Collections\.Generic\.ICollection\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1 'System\.Collections\.Generic\.ICollection\`1') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).scope}

A collection of scopes defining the categories of claims required\.

###### `requestedClaims` [System\.Collections\.Generic\.ICollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1 'System\.Collections\.Generic\.ICollection\`1')[System\.Collections\.Generic\.KeyValuePair&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2 'System\.Collections\.Generic\.KeyValuePair\`2')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[,](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2 'System\.Collections\.Generic\.KeyValuePair\`2')[RequestedClaimDetails](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.RequestedClaimDetails 'Abblix\.Oidc\.Server\.Model\.RequestedClaimDetails')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2 'System\.Collections\.Generic\.KeyValuePair\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1 'System\.Collections\.Generic\.ICollection\`1') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).requestedClaims}

A collection detailing specific claims requested by the client, including any
            requirements for essential claims\.

###### `clientInfo` [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo') {#Abblix.Oidc.Server.Features.UserInfo.UserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).clientInfo}

Information about the client application making the request, which may influence how
            claims are processed and returned\.

Implements [GetUserClaimsAsync\(AuthSession, ICollection&lt;string&gt;, ICollection&lt;KeyValuePair&lt;string,RequestedClaimDetails&gt;&gt;, ClientInfo\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserInfo.IUserClaimsProvider#Abblix.Oidc.Server.Features.UserInfo.IUserClaimsProvider.GetUserClaimsAsync(Abblix.Oidc.Server.Features.UserAuthentication.AuthSession,System.Collections.Generic.ICollection_string_,System.Collections.Generic.ICollection_System.Collections.Generic.KeyValuePair_string,Abblix.Oidc.Server.Model.RequestedClaimDetails__,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo) 'Abblix\.Oidc\.Server\.Features\.UserInfo\.IUserClaimsProvider\.GetUserClaimsAsync\(Abblix\.Oidc\.Server\.Features\.UserAuthentication\.AuthSession, System\.Collections\.Generic\.ICollection\<string\>, System\.Collections\.Generic\.ICollection\<System\.Collections\.Generic\.KeyValuePair\<string,Abblix\.Oidc\.Server\.Model\.RequestedClaimDetails\>\>, Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Text\.Json\.Nodes\.JsonObject](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonobject 'System\.Text\.Json\.Nodes\.JsonObject')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that when completed returns a [System\.Text\.Json\.Nodes\.JsonObject](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonobject 'System\.Text\.Json\.Nodes\.JsonObject') representing the user claims,
            or throws an exception if required claims are missing\.
