Interface ApiKeyPrincipalLookup

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ApiKeyPrincipalLookup

API key 的主體查找 SPI(ADR-025 決策五)

api-key 是同一個服務帳號身分的第二種憑證呈遞,不是第二套身分——解析後走與 client_credentials 完全相同的租戶與權限鏈。故本 SPI 回的是同一個 AuthPrincipal 契約,而非另一種主體型別。

持久化歸消費端(ADR-017:jar 不擁有 entity)。實作應在此順帶記錄 last-used——它本來 就在碰持久層,而輪替衛生(找出沉睡憑證)需要這個時間戳。逐請求寫入過貴,實作應自行節流 (如僅在既有時間戳超過門檻時才更新)。