17.121. Interface IAuthenticationTable
Namespace: ArmoniK.Core.Common.Auth.Authentication
Assembly: ArmoniK.Core.Common.dll
Interface for the authentication storage
public interface IAuthenticationTable : IInitializable, IHealthCheckProvider
17.121.1. Implements
IInitializable, IHealthCheckProvider
17.121.2. Methods
17.121.2.1. AddCertificates(IEnumerable<AuthData>)
Adds certificates to the database
void AddCertificates(IEnumerable<AuthData> certificates)
17.121.2.1.1. Parameters
certificates IEnumerable<AuthData>
Certificates to be added
17.121.2.2. AddRoles(IEnumerable<RoleData>)
Adds roles to the database
void AddRoles(IEnumerable<RoleData> roles)
17.121.2.2.1. Parameters
roles IEnumerable<RoleData>
Roles to be added
17.121.2.3. AddUsers(IEnumerable<UserData>)
Adds users to the database
void AddUsers(IEnumerable<UserData> users)
17.121.2.3.1. Parameters
users IEnumerable<UserData>
Users to be added
17.121.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)
17.121.2.4.1. Parameters
cn string
Common name of the certificate
fingerprint string
Fingerprint of the certificate
cancellationToken CancellationToken
Cancellation token
17.121.2.4.2. Returns
Task<UserAuthenticationResult?>
User authentication data matching the provided certificate, null if not found
17.121.2.5. GetIdentityFromUserAsync(string?, 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(string? id, string? username, CancellationToken cancellationToken = default)
17.121.2.5.1. Parameters
id string?
User Id
username string?
User name
cancellationToken CancellationToken
Cancellation token
17.121.2.5.2. Returns
Task<UserAuthenticationResult?>
User authentication data matching the id, if not null, otherwise the username, null if not found