Skip to content

Implement API Key Model Logic in Go#63

Merged
dcordz merged 1 commit into
golang-stagingfrom
go-backend-conversion-1
Oct 15, 2025
Merged

Implement API Key Model Logic in Go#63
dcordz merged 1 commit into
golang-stagingfrom
go-backend-conversion-1

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This change implements the business logic for the APIKey model in the Go backend, porting it from the original Ruby on Rails application. This includes token generation using HMAC-SHA512 and authentication functions.


PR created automatically by Jules for task 15242739009293426383

This commit ports the business logic for the APIKey model from the Ruby on Rails application to the new Go backend.

The implementation includes:
- A GORM BeforeCreate hook to generate an HMAC-SHA512 token digest.
- AuthenticateByToken and AuthenticateByToken! functions for token verification.
- Secure handling of the HMAC secret key using environment variables.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

@dcordz dcordz changed the base branch from main to golang-staging October 15, 2025 11:43
@dcordz dcordz marked this pull request as ready for review October 15, 2025 11:43
@dcordz dcordz merged commit 81a5ab6 into golang-staging Oct 15, 2025
2 of 3 checks passed
@dcordz dcordz deleted the go-backend-conversion-1 branch October 15, 2025 11:43
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