feat: ✨ add serverside core logic and refresh logic#2
Merged
faizanazim11 merged 4 commits intomasterfrom Sep 18, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces the foundational server-side authentication and authorization package tp-auth-serverside for TechPrismatica projects. The implementation provides JWT-based authentication, memory database session storage, token refresh mechanisms, and gRPC services for secure microservice communication.
- Implements comprehensive JWT utilities with support for both HS256 and RS256 algorithms
- Adds memory database integration for session token storage and refresh token restrictions
- Introduces gRPC-based token refresh service for efficient cross-service communication
Reviewed Changes
Copilot reviewed 23 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tp_auth_serverside/utilities/jwt_util.py | Core JWT token encoding, decoding, and verification utilities |
| src/tp_auth_serverside/pb/refresh_pb2_grpc.py | Generated gRPC service stubs for token refresh functionality |
| src/tp_auth_serverside/pb/refresh_pb2.py | Generated protocol buffer classes for refresh service |
| src/tp_auth_serverside/db/memorydb/refresh.py | Memory database operations for refresh token restrictions |
| src/tp_auth_serverside/db/memorydb/login.py | Session token storage and retrieval in memory database |
| src/tp_auth_serverside/db/memorydb/init.py | Memory database connector initialization |
| src/tp_auth_serverside/core/handler/refresh_handler.py | gRPC refresh service implementation |
| src/tp_auth_serverside/core/handler/authentication_handler.py | Authentication flow handler for FastAPI integration |
| src/tp_auth_serverside/core/fastapi_configurer.py | FastAPI application configuration and middleware setup |
| src/tp_auth_serverside/config.py | Environment variable configuration and validation |
| src/tp_auth_serverside/auth/user_specs.py | User information schema definition |
| src/tp_auth_serverside/auth/schemas.py | Authentication-related Pydantic schemas |
| src/tp_auth_serverside/auth/requestor.py | HTTP request utility with authentication headers |
| src/tp_auth_serverside/auth/auth_validator.py | JWT token validation and user authentication |
| src/tp_auth_serverside/init.py | Package exports and public API |
| pyproject.toml | Project configuration and dependencies |
| protos/refresh.proto | gRPC service definition for token refresh |
| README.md | Comprehensive documentation and usage examples |
| .python-version | Python version specification |
| .pre-commit-config.yaml | Pre-commit hooks configuration |
| .github/workflows/publish_package.yaml | CI/CD pipeline for package publishing |
| .github/workflows/linter.yaml | Linting workflow configuration |
| .github/copilot-instructions.md | Development and Copilot guidance documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Closes #1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request sets up the foundational developer experience, CI/CD, and documentation for the
tp-auth-serversidePython package. It introduces comprehensive instructions and validation scenarios, establishes automated linting and publishing workflows, and configures pre-commit hooks and Python version management. These changes ensure a smooth development process, consistent code quality, and reliable package publishing.Developer documentation and onboarding:
.github/copilot-instructions.mdwith setup, testing, environment, validation, repository structure, and troubleshooting guidance for both developers and Copilot. This includes manual and automated testing instructions, environment variable requirements, and database support.Continuous Integration/Continuous Deployment:
.github/workflows/linter.yamlto run linting and formatting checks using Ruff on every pull request, enforcing code quality standards automatically..github/workflows/publish_package.yamlto automate building, publishing to PyPI, and signing releases with Sigstore when a new tag is pushed.Development environment and tooling:
.pre-commit-config.yamlto enable pre-commit hooks for whitespace, requirements, and Ruff linting/formatting, ensuring code style consistency before commits.3.12in.python-versionfor consistent local and CI environments.