Commit graph

5 commits

Author SHA1 Message Date
Max
c1b28f3b69 Add scope field to dynamic client registration tests
- Updated test cases for dynamic client registration to include a scope field with values "openid profile email".
- Ensured that tests reflect the expected behavior when scope is provided, enhancing validation coverage for client registration requests.
2025-08-04 11:19:45 +08:00
Max
4682c20903 Update OAuth client configuration and ID generation methods
- Added support for numeric ID generation in the OAuth service, replacing the previous NanoID approach for better compatibility.
- Refactored client ID and secret generation methods to be public and renamed them for consistency.
- Enhanced dynamic client registration to allow optional client ID usage.
- Updated client configuration loading to include validation and registration of clients if not found.
- Improved error handling and logging for client configuration processes.
- Adjusted tests to reflect changes in ID generation and client configuration handling.
2025-08-04 11:04:56 +08:00
Max
757f040fd0 Refactor test data handling for improved isolation and cleanup
- Updated test cases to utilize unique client IDs and user emails with suffixes for better isolation during parallel test execution.
- Enhanced the setupTestData function to generate unique identifiers for test clients and users, preventing conflicts in concurrent test runs.
- Implemented comprehensive cleanup patterns to ensure all test data is removed after execution, improving test reliability and maintainability.
2025-08-03 11:16:46 +08:00
Max
9fd0d4713a Add tests for dynamic client registration validation in OAuth service
- Implemented tests to verify error handling for disallowed redirect URI hosts and schemes during dynamic client registration.
- Updated test clients to use localhost for redirect URIs, ensuring consistency in testing environment.
2025-07-18 14:58:29 +08:00
Max
944c3e1b8e Enhance client creation and dynamic registration in OAuth service
- Added default values for grant types, response types, application type, and token endpoint auth method during dynamic client registration.
- Implemented nil checks for client information in the CreateClient and UpdateClient methods to ensure robust error handling and validation.
2025-07-18 14:51:34 +08:00