-
Notifications
You must be signed in to change notification settings - Fork 2
feat: email support #296
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
feat: email support #296
Conversation
feat: forgot-password Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
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 email support and forgot-password functionality for the Compliance Framework API. It introduces a comprehensive email service infrastructure with multiple provider support (SMTP, AWS SES, SendGrid), along with a templating system for email content and a complete password reset flow using JWT tokens.
Key changes:
- Email service with SMTP, SES, and SendGrid provider implementations
- Password reset flow with 15-minute JWT token expiration
- HTML and text email templates for password reset notifications
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
internal/service/email/types/types.go |
Defines email provider interfaces and message types |
internal/service/email/service.go |
Core email service implementation with template support |
internal/service/email/providers/smtp.go |
SMTP provider implementation with TLS/SSL support |
internal/service/email/providers/ses.go |
AWS SES provider implementation |
internal/service/email/providers/sendgrid.go |
SendGrid provider stub (not yet implemented) |
internal/service/email/factory.go |
Factory methods for creating email providers |
internal/service/email/templates/service.go |
Template rendering service for HTML and text emails |
internal/service/email/templates/service_test.go |
Tests for template service |
internal/service/email/templates/templates/forgot-password.html |
HTML email template for password reset |
internal/service/email/templates/templates/forgot-password.txt |
Plain text email template for password reset |
internal/api/handler/auth/auth.go |
Adds ForgotPassword and PasswordReset endpoints |
internal/api/handler/auth/password_reset_test.go |
Tests for password reset functionality |
internal/api/handler/auth/api.go |
Integrates email service into auth handlers |
internal/authn/jwt.go |
Adds JWT token generation and verification for password reset |
internal/config/email.go |
Email configuration loading and validation |
internal/config/config.go |
Integrates email config into main config |
email.yaml |
Example email configuration file |
docs/forgot-password-flow.md |
Documentation for password reset flow |
docs/swagger.yaml, docs/swagger.json, docs/docs.go |
Swagger API documentation updates |
go.mod, go.sum |
AWS SDK dependencies |
cmd/users/create.go |
Sets AuthMethod to "password" for CLI-created users |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
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
Copilot reviewed 24 out of 25 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
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
Copilot reviewed 27 out of 28 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
feat: forgot-password