26.113. Interface IAuthenticationTable

Namespace: ArmoniK.Core.Common.Auth.Authentication
Assembly: ArmoniK.Core.Common.dll

Interface for the authentication storage

public interface IAuthenticationTable : IInitializable, IHealthCheckProvider

26.113.1. Implements

IInitializable, IHealthCheckProvider

26.113.2. Methods

26.113.2.1. AddCertificates(IEnumerable<AuthData>)

Adds certificates to the database

void AddCertificates(IEnumerable<AuthData> certificates)

26.113.2.1.1. Parameters

certificates IEnumerable<AuthData>

Certificates to be added

26.113.2.2. AddRoles(IEnumerable<RoleData>)

Adds roles to the database

void AddRoles(IEnumerable<RoleData> roles)

26.113.2.2.1. Parameters

roles IEnumerable<RoleData>

Roles to be added

26.113.2.3. AddUsers(IEnumerable<UserData>)

Adds users to the database

void AddUsers(IEnumerable<UserData> users)

26.113.2.3.1. Parameters

users IEnumerable<UserData>

Users to be added

26.113.2.4. GetIdentityFromCertificateAsync(string, string, CancellationToken)

Get the User authentication data from the database, based on the provided certificate

Task<UserAuthenticationResult?> GetIdentityFromCertificateAsync(string cn, string fingerprint, CancellationToken cancellationToken = default)

26.113.2.4.1. Parameters

cn string

Common name of the certificate

fingerprint string

Fingerprint of the certificate

cancellationToken CancellationToken

Cancellation token

26.113.2.4.2. Returns

Task<UserAuthenticationResult?>

User authentication data matching the provided certificate, null if not found

26.113.2.5. GetIdentityFromUserAsync(int?, string?, CancellationToken)

Get the User authentication data from the database, based on the id or username. If id is not null, will be used for matching, otherwise tries to match the username

Task<UserAuthenticationResult?> GetIdentityFromUserAsync(int? id, string? username, CancellationToken cancellationToken = default)

26.113.2.5.1. Parameters

id int?

User Id

username string?

User name

cancellationToken CancellationToken

Cancellation token

26.113.2.5.2. Returns

Task<UserAuthenticationResult?>

User authentication data matching the id, if not null, otherwise the username, null if not found