Skip to main content

IUserInfoHandler Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces

IUserInfoHandler Interface

Endpoint contract for the OpenID Connect UserInfo endpoint (OIDC Core 1.0 §5.3), which returns claims about the authenticated end-user identified by the bearer access token presented per RFC 6750.

public interface IUserInfoHandler

Derived
UserInfoHandler

Methods

IUserInfoHandler.HandleAsync(UserInfoRequest, ClientRequest) Method

Asynchronously handles a UserInfo request, validating the request for authorization and processing it to return the requested user information.

System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError>> HandleAsync(Abblix.Oidc.Server.Model.UserInfoRequest userInfoRequest, Abblix.Oidc.Server.Model.ClientRequest clientRequest);

Parameters

userInfoRequest UserInfoRequest

The user info request containing the access token and possibly other parameters defining the scope of information requested.

clientRequest ClientRequest

Additional client-specific request information that may be necessary for processing the request in certain contexts.

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<UserInfoFoundResponse,OidcError>>
A System.Threading.Tasks.Task that resolves to a Abblix.Utils.Result<>, which contains the user information if the request is authorized and valid, or an error response indicating why the request could not be fulfilled.

Remarks

This method plays a crucial role in the OAuth 2.0 and OIDC ecosystems by enabling secure access to user information based on authorized requests. Implementations should ensure that the access token provided in the UserInfo request is validated and that any returned information is consistent with the scopes granted during the authorization process.