Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Go, Go, Go! #3

Open
5 of 10 tasks
cheetahbyte opened this issue Jul 21, 2023 · 0 comments · Fixed by #5
Open
5 of 10 tasks

Go, Go, Go! #3

cheetahbyte opened this issue Jul 21, 2023 · 0 comments · Fixed by #5
Assignees

Comments

@cheetahbyte
Copy link
Member

cheetahbyte commented Jul 21, 2023

Go Rewrite

Let's rewrite this service in Go.

Events

These are the events the service is going to listen on:

(To be added in Future)

  • auth.password-change: This changes the password.
  • auth.mfa: This event is used to activate the mfa using TOTP or EOTP.
  • auth.mfa.validate: This event is used to validate the token submitted by the user.
  • auth.logout: This event is used to logout.
  • auth.session.purge: This event clears all current sessions from redis and the database.

Interface

It's important that all services share the same interface, more or less.
The interface that's going to be used (JSON) looks like this.

{
    "content": "...", // content of the response, if any
    "status": {},  // detailed information on the status "201" for example or "404" with `application/problem+json` approach.
    "meta": {} // metadata like process time and worker id 
}
@cheetahbyte cheetahbyte self-assigned this Jul 21, 2023
@cheetahbyte cheetahbyte linked a pull request Jul 21, 2023 that will close this issue
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- added handler hostname to identify the worker that processed the request.

#3
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- implement handler for `auth.sessions.get`
- add server for `auth.sessions.get` to main.go

#3 Closes #6
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- session ID will be added to redis cache with a ttl

#3
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- implement `auth.session.get`

#3 Closes #6
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- implement `auth.sessions.exists` handler
- add listener for `auth.sessions.exists` to main.go

#3 Closes #8
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- add DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME to gorm Config
- add REDIS_HOST, REDIS_PORT, REDIS_PASS to redis config
- add PEPPER to password encryption and comparaison

#3
cheetahbyte pushed a commit that referenced this issue Jul 22, 2023
- add docker file for go

#3
@cheetahbyte cheetahbyte reopened this Jul 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant