Skip to content

DiGi.User.WebAPI.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.User.WebAPI.Classes Namespace

Classes

UserController Class

Controller responsible for handling user-related operations, including authentication and access to protected data.

public class UserController : DiGi.WebAPI.Classes.WebAPIController

Inheritance System.Object → Microsoft.AspNetCore.Mvc.ControllerBase → DiGi.Core.Interfaces.IObject → DiGi.WebAPI.Classes.WebAPIController → UserController

Constructors

UserController(SecurityKeyManager) Constructor

Initializes a new instance of the UserController class.

public UserController(DiGi.WebAPI.Classes.SecurityKeyManager securityKeyManager);

Parameters

securityKeyManager DiGi.WebAPI.Classes.SecurityKeyManager

The security key manager used for managing cryptographic keys.

Methods

UserController.GetProtectedData() Method

Retrieves secure data that requires authorization.

public Microsoft.AspNetCore.Mvc.IActionResult GetProtectedData();

Returns

Microsoft.AspNetCore.Mvc.IActionResult
An Microsoft.AspNetCore.Mvc.IActionResult containing the protected data or an authorization error.

UserController.Login(UserLogin) Method

Authenticates a user and generates a JWT security token.

public Microsoft.AspNetCore.Mvc.IActionResult Login(DiGi.User.Classes.UserLogin userLogin);

Parameters

userLogin DiGi.User.Classes.UserLogin

The login credentials of the user.

Returns

Microsoft.AspNetCore.Mvc.IActionResult
An Microsoft.AspNetCore.Mvc.IActionResult containing the generated token upon success, or an unauthorized result.