| 1234567891011121314151617181920212223242526272829303132 |
- 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;
- }
- }
|