using Invercargill; namespace Spry.Authorisation { /** * Interface for retrieving Identity objects by ID or username. * * The AuthorisationContext uses this to get_current_identity_async(). * Applications register their implementation during startup. * * Built-in implementation: Spry.Authentication.UserIdentityProvider */ public interface IdentityProvider : GLib.Object { /** * Retrieves an Identity by its unique ID. * * @param id The identity ID from the token * @return The Identity, or null if not found/inactive * @throws Error on retrieval failure */ public abstract async Identity? get_identity_by_identifier(Element identifier) throws Error; /** * Retrieves an Identity by its username. * * @param username The username to look up * @return The Identity, or null if not found/inactive * @throws Error on retrieval failure */ public abstract async Identity? get_identity_by_username(string username) throws Error; } }