diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4f56e98 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,41 @@ +--- +name: Bug Report +about: Create a report to help us improve NETCore.Keycloak +title: '[BUG] ' +labels: 'bug' +assignees: '' +--- + +## ๐Ÿ› Bug Description + + +## ๐Ÿ“ Steps To Reproduce +1. +2. +3. + +## โœ… Expected Behavior + + +## โŒ Actual Behavior + + +## ๐Ÿ”ง Environment +- NETCore.Keycloak Version: +- .NET Version: +- Keycloak Server Version: +- Operating System: + +## ๐Ÿ“š Additional Context + + +## ๐Ÿ’ก Possible Solution + + +## ๐Ÿ“ธ Screenshots + + +## ๐Ÿ“Š Logs + +``` +[Paste logs here] diff --git a/.github/ISSUE_TEMPLATE/docs_improvement.md b/.github/ISSUE_TEMPLATE/docs_improvement.md new file mode 100644 index 0000000..5ef5cf6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/docs_improvement.md @@ -0,0 +1,28 @@ +--- +name: Documentation Improvement +about: Suggest improvements to NETCore.Keycloak documentation +title: '[DOCS] ' +labels: 'documentation' +assignees: '' +--- + +## ๐Ÿ“š Documentation Area + + +## ๐Ÿ“ Current Documentation + + +## โœจ Proposed Changes + + +## ๐ŸŽฏ Reason for Change + + +## ๐Ÿ“‹ Additional Context + + +## โœ… Checklist +- [ ] Checked for existing documentation +- [ ] Provided clear examples (if applicable) +- [ ] Checked for technical accuracy +- [ ] Ensured proper formatting diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..4b81d03 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,32 @@ +--- +name: Feature Request +about: Suggest a new feature for NETCore.Keycloak +title: '[FEATURE] ' +labels: 'enhancement' +assignees: '' +--- + +## โœจ Feature Description + + +## ๐ŸŽฏ Use Case + + +## ๐Ÿ’ก Proposed Solution + + +## ๐Ÿ”„ Alternative Solutions + + +## ๐Ÿ“ Additional Context + + +## โœ… Implementation Checklist +- [ ] Feature design document +- [ ] Unit tests +- [ ] Documentation updates +- [ ] API documentation (if applicable) +- [ ] Example code (if applicable) + +## ๐Ÿ”— Related Issues/PRs + diff --git a/.github/ISSUE_TEMPLATE/refactor_proposal.md b/.github/ISSUE_TEMPLATE/refactor_proposal.md new file mode 100644 index 0000000..e899ce6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor_proposal.md @@ -0,0 +1,32 @@ +--- +name: Refactor Proposal +about: Propose code refactoring to improve NETCore.Keycloak +title: '[REFACTOR] ' +labels: 'refactor' +assignees: '' +--- + +## ๐Ÿ”„ Refactor Scope + + +## ๐Ÿ“ Current Implementation + + +## โœจ Proposed Changes + + +## ๐ŸŽฏ Benefits + + +## โš ๏ธ Potential Risks + + +## ๐Ÿ“‹ Implementation Plan +- [ ] Unit tests for new implementation +- [ ] Refactor implementation +- [ ] Update documentation +- [ ] Performance testing (if applicable) +- [ ] Migration guide (if breaking changes) + +## ๐Ÿ“š Additional Context + diff --git a/.github/PULL_REQUEST_TEMPLATE/bugfix.md b/.github/PULL_REQUEST_TEMPLATE/bugfix.md new file mode 100644 index 0000000..c35cb4e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/bugfix.md @@ -0,0 +1,34 @@ +--- +name: Bug Fix +about: Submit a bug fix for NETCore.Keycloak +title: '[BUGFIX] ' +labels: 'bug' +--- + +## ๐Ÿ› Bug Description + + +## ๐Ÿ”ง Fix Description + + +## ๐Ÿ” Root Cause + + +## ๐Ÿงช Testing + + +## โœ… Regression Tests + + +## ๐Ÿ“‹ Checklist +- [ ] I have followed the code style guidelines +- [ ] I have added regression tests +- [ ] I have updated documentation if needed +- [ ] I have added/updated XML documentation comments if needed +- [ ] I have verified the fix in my local environment + +## ๐Ÿ“š Additional Context + + +## ๐Ÿ“ธ Screenshots + diff --git a/.github/PULL_REQUEST_TEMPLATE/docs.md b/.github/PULL_REQUEST_TEMPLATE/docs.md new file mode 100644 index 0000000..ef3cd69 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/docs.md @@ -0,0 +1,34 @@ +--- +name: Documentation Update +about: Submit documentation changes for NETCore.Keycloak +title: '[DOCS] ' +labels: 'documentation' +--- + +## ๐Ÿ“š Documentation Changes + + +## ๐Ÿ”— Related Issue + + +## ๐Ÿ“‹ Type of Change + +- [ ] New documentation +- [ ] Documentation update +- [ ] Fix typos/errors +- [ ] Improve clarity +- [ ] Add examples +- [ ] Other (please describe) + +## โœ… Checklist +- [ ] I have checked for technical accuracy +- [ ] I have tested all code examples (if any) +- [ ] I have checked for proper formatting +- [ ] I have verified all links work +- [ ] I have run spellcheck + +## ๐Ÿ–ผ๏ธ Preview + + +## ๐Ÿ“ Additional Notes + diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md new file mode 100644 index 0000000..3bd257b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/feature.md @@ -0,0 +1,38 @@ +--- +name: Feature Implementation +about: Submit a new feature to NETCore.Keycloak +title: '[FEATURE] ' +labels: 'enhancement' +--- + +## โœจ Feature Description + + +## ๐Ÿ”— Related Issue + + +## ๐Ÿ› ๏ธ Implementation Details + + +## ๐Ÿงช Testing + + +## ๐Ÿ“š Documentation + + +## โš ๏ธ Breaking Changes + + +## โœ… Checklist +- [ ] I have followed the code style guidelines +- [ ] I have added unit tests +- [ ] I have updated documentation +- [ ] I have added XML documentation comments +- [ ] I have tested the feature thoroughly +- [ ] I have added example code (if applicable) + +## ๐Ÿ“ธ Screenshots + + +## ๐Ÿ“ Additional Notes + diff --git a/.github/PULL_REQUEST_TEMPLATE/hotfix.md b/.github/PULL_REQUEST_TEMPLATE/hotfix.md new file mode 100644 index 0000000..980a9a9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/hotfix.md @@ -0,0 +1,37 @@ +--- +name: Hotfix +about: Submit an urgent fix for NETCore.Keycloak +title: '[HOTFIX] ' +labels: 'hotfix' +--- + +## ๐Ÿšจ Emergency Description + + +## ๐Ÿ’ฅ Impact + + +## ๐Ÿ”ง Fix Description + + +## โš ๏ธ Risk Assessment + + +## ๐Ÿงช Testing + + +## โœ… Verification Steps + + +## ๐Ÿ“‹ Checklist +- [ ] I have followed the code style guidelines +- [ ] I have added tests +- [ ] I have updated documentation if needed +- [ ] I have tested in production-like environment +- [ ] I have considered potential side effects + +## ๐Ÿ”„ Rollback Plan + + +## ๐Ÿ“š Additional Context + diff --git a/.github/workflows/branch_naming_policy.yml b/.github/workflows/branch_naming_policy.yml index 1097aa4..330f707 100644 --- a/.github/workflows/branch_naming_policy.yml +++ b/.github/workflows/branch_naming_policy.yml @@ -22,7 +22,7 @@ jobs: - name: Branch naming policy check run: | echo "${{ steps.extract_branch.outputs.branch }}" - [[ "${{ steps.extract_branch.outputs.branch }}" =~ ^[a-z0-9_]{5,50}$ ]] || exit 1 + [[ "${{ steps.extract_branch.outputs.branch }}" =~ ^(feature|bugfix|hotfix|docs|refactor)/[a-z0-9_]{5,50}$ ]] || exit 1 - name: Close pull request and delete branch if: failure() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c59b5bd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contributing to NETCore.Keycloak + +We love your input! We want to make contributing to NETCore.Keycloak as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the code +- Submitting a fix +- Proposing new features +- Becoming a maintainer + +## Development Process + +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. + +### Branch Naming Convention + +All branch names must follow this format: +``` +(feature|bugfix|hotfix|docs|refactor)/[a-z0-9_]{5,50} +``` + +This means: +- Start with one of these prefixes: `feature/`, `bugfix/`, `hotfix/`, `docs/`, `refactor/` +- Followed by a description that: + - Is 5-50 characters long + - Uses only lowercase letters (a-z), numbers (0-9), and underscores (_) + - No spaces, hyphens, or special characters allowed + +Examples: +- `feature/add_token_refresh` +- `bugfix/fix_auth_flow_123` +- `hotfix/security_patch_456` +- `docs/update_readme_789` +- `refactor/simplify_code_101` + +### Pull Request Process + +1. Fork the repo and create your branch from `main` following the branch naming convention +2. Ensure your code follows the existing code style and formatting rules defined in `.editorconfig` +3. Update the documentation if needed +4. Ensure all tests pass +5. Create a Pull Request with a clear title and description + +### Code Style Guidelines + +We use `.editorconfig` to maintain consistent coding styles. Some key points: +- Use tabs for indentation +- Maximum line length is 120 characters +- UTF-8 encoding +- Trim trailing whitespace +- Insert final newline +- Follow C# naming conventions +- Use proper spacing and bracing rules as defined in `.editorconfig` + +#### Documentation Requirements +- All public APIs must be documented using XML documentation comments +- Documentation should follow the standard XML format: + ```csharp + /// + /// Brief description of what the method/class does + /// + /// Description of the parameter + /// Description of the return value + /// When the exception is thrown + ``` +- Include code examples in documentation when the usage is not immediately obvious +- Keep comments up to date with code changes +- Use clear and concise language +- Document non-obvious implementation details or business logic +- Include references to related documentation or external resources when applicable + +### Commit Message Guidelines + +- Use the present tense ("Add feature" not "Added feature") +- Use the imperative mood ("Move cursor to..." not "Moves cursor to...") +- Limit the first line to 72 characters or less +- Reference issues and pull requests liberally after the first line + +### Security + +- Never commit sensitive information (API keys, credentials, etc.) +- Follow SAST (Static Application Security Testing) rules defined in `.editorconfig` +- Report security vulnerabilities privately to the maintainers + +## License + +By contributing, you agree that your contributions will be licensed under the same license as the project. + +## Questions? + +Don't hesitate to open an issue for any questions or concerns. diff --git a/NETCore.Keycloak.Client/README.md b/NETCore.Keycloak.Client/README.md index 8df4f54..ea4970e 100644 --- a/NETCore.Keycloak.Client/README.md +++ b/NETCore.Keycloak.Client/README.md @@ -87,7 +87,7 @@ var token = await keycloakClient.Auth.GetClientCredentialsTokenAsync( var users = await keycloakClient.Users.GetAsync( "your-realm", token.AccessToken, - new KcUserFilter { MaxResults = 10 }); + new KcUserFilter { Max = 10 }); ``` ## ๐Ÿ“„ License diff --git a/README.md b/README.md index 62c380a..80f8ece 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ var token = await keycloakClient.Auth.GetClientCredentialsTokenAsync( var users = await keycloakClient.Users.GetAsync( "your-realm", token.AccessToken, - new KcUserFilter { MaxResults = 10 }); + new KcUserFilter { Max = 10 }); ``` ## ๐Ÿ“š Documentation @@ -227,13 +227,17 @@ make install_virtual_env dotnet cake e2e_test.cake ``` -## ๐Ÿค Contributing - -We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project. - ## ๐Ÿ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ---- +## ๐Ÿค Contributing + +We welcome contributions from the community! Please check our [Contributing Guidelines](CONTRIBUTING.md) for details on: + +- Branch naming conventions +- Code style and formatting rules +- Pull request process +- Security guidelines + โญ Star us on GitHub | ๐Ÿ“ซ Report Issues | ๐Ÿ“š Read the Docs