#### [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')

## IUserClaimsProvider Interface

Defines an interface for retrieving user\-specific claims based on authentication sessions and requested claims\.
This interface plays a crucial role in authentication flows, where it extracts and formats user data for inclusion
in tokens or other authorization responses, ensuring compliance with specified scopes and claim requests\.

```csharp
public interface IUserClaimsProvider
```

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

## IUserClaimsProvider\.GetUserClaimsAsync\(AuthSession, ICollection\<string\>, ICollection\<KeyValuePair\<string,RequestedClaimDetails\>\>, ClientInfo\) Method {#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)}

Asynchronously retrieves structured user claims based on the provided authentication session, requested scopes,
additional claim details, and client information\. This method is crucial for generating claims that are to be
embedded in identity tokens or provided through user info endpoints, allowing for a personalized and secure user
experience based on the authenticated session and application requirements\.

```csharp
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.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).authSession}

The authentication session which includes details about the user's authentication
            state and may affect the resultant claims\.

###### `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.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).scope}

A collection of scopes indicating which categories of claims are requested\.
            Each scope can correlate to multiple claims, influencing the granularity and type of data returned\.

###### `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.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).requestedClaims}

Additional details about specific claims requested, often providing finer control
            over the claims’ properties such as essentiality or value requirements, enhancing the flexibility and
            adaptiveness of claim retrieval\.

###### `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.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).clientInfo}

Information about the client application making the request, which may influence
            the processing and filtering of claims based on client\-specific settings or requirements\.

#### 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 resolves to a [System\.Text\.Json\.Nodes\.JsonObject](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonobject 'System\.Text\.Json\.Nodes\.JsonObject') encapsulating the user claims in a structured JSON
            format suitable for further processing, or null if the necessary claims cannot be retrieved or are not
            applicable based on the session details\.
