IUserClaimsProvider Interface
Abblix.Oidc.Server
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.
public interface IUserClaimsProvider
Derived
↳ UserClaimsProvider
Methods
IUserClaimsProvider.GetUserClaimsAsync(AuthSession, ICollection<string>, ICollection<KeyValuePair<string,RequestedClaimDetails>>, ClientInfo) Method
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.
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
The authentication session which includes details about the user's authentication state and may affect the resultant claims.
scope System.Collections.Generic.ICollection<System.String>
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<System.Collections.Generic.KeyValuePair<System.String,RequestedClaimDetails>>
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
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<System.Text.Json.Nodes.JsonObject>
A task that resolves to a 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.