clients.d.ts 1.2 KB

12345678910111213141516171819
  1. import { OAuthClientInformationFull } from '../../shared/auth.js';
  2. /**
  3. * Stores information about registered OAuth clients for this server.
  4. */
  5. export interface OAuthRegisteredClientsStore {
  6. /**
  7. * Returns information about a registered client, based on its ID.
  8. */
  9. getClient(clientId: string): OAuthClientInformationFull | undefined | Promise<OAuthClientInformationFull | undefined>;
  10. /**
  11. * Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.
  12. *
  13. * NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the `client_secret_expires_at` field and reject requests with expired secrets. Any custom logic for authenticating clients should check the `client_secret_expires_at` field as well.
  14. *
  15. * If unimplemented, dynamic client registration is unsupported.
  16. */
  17. registerClient?(client: Omit<OAuthClientInformationFull, 'client_id' | 'client_id_issued_at'>): OAuthClientInformationFull | Promise<OAuthClientInformationFull>;
  18. }
  19. //# sourceMappingURL=clients.d.ts.map