Skip to content

Conversation

@gusfcarvalho
Copy link
Contributor

feat: forgot-password

feat: forgot-password
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings December 29, 2025 10:58
Copy link
Contributor

Copilot AI left a 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>
Copy link
Contributor

Copilot AI left a 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>
Copy link
Contributor

Copilot AI left a 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>
@gusfcarvalho gusfcarvalho enabled auto-merge (squash) December 29, 2025 13:56
@gusfcarvalho gusfcarvalho merged commit ba1ec7e into main Dec 29, 2025
4 checks passed
@gusfcarvalho gusfcarvalho deleted the gc-feat-email-support branch December 29, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant