-
Notifications
You must be signed in to change notification settings - Fork 42
SDP-1853: Implement SEP-45 routes #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
stellar-disbursement-platform-backend-preview is available here: |
f8d394c to
4b3b95a
Compare
|
stellar-disbursement-platform-backend-preview is available here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements SEP-45 smart contract authentication by adding JWT generation, HTTP handlers, and service logic for creating and validating authorization challenges for smart contract wallets on the Stellar network.
Key Changes
- Added SEP-45 JWT claims validation and token generation/parsing to the JWT manager
- Implemented SEP-45 service with challenge creation and validation using Soroban authorization entries
- Created HTTP handlers and routes for
/sep45/authendpoints supporting both GET and POST methods
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/sepauth/jwt_manager.go | Adds Sep45JWTClaims struct and methods for generating/parsing SEP-45 JWT tokens |
| internal/sepauth/jwt_manager_test.go | Comprehensive test coverage for SEP-45 JWT token generation and parsing |
| internal/services/sep45_service.go | Core SEP-45 service implementation with challenge creation and validation logic |
| internal/services/sep45_service_test.go | Test coverage for SEP-45 service including error cases and JWT validation |
| internal/services/sep45_service_mock.go | Auto-generated mock for SEP45Service interface |
| internal/serve/httphandler/sep45_handler.go | HTTP handlers for GET/POST /sep45/auth endpoints with proper error handling |
| internal/serve/httphandler/sep45_handler_test.go | Test coverage for SEP-45 HTTP handlers including various content types |
| internal/serve/serve.go | Integration of SEP-45 service into the server setup and routing |
| internal/serve/serve_test.go | Updates to test configuration to enable SEP-45 and verify unauthenticated endpoints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JiahuiWho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
marwen-abid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Conflicts: internal/services/sep45_service.go
|
stellar-disbursement-platform-backend-preview is available here: |
What
This PR implements the JWT generation and HTTP handler for SEP-45.
Why
SEP-45 implementation
Known limitations
Nonce is still missing, and SEP-45 could be refactored to share some code with SEP-10. I'll address these in a follow-up.
Checklist
SDP-1234: Add new featureorChore: Refactor package xyzformat. The Jira ticket code was included if available.CHANGELOG.mdis updated (if applicable)