This works very well, just need to determine what routes will be protected and such. For now, a simple system is setup, with more to come. For now, this is a WIP and needs some light work. But auth is almost complete.
19 lines
415 B
Go
19 lines
415 B
Go
package domain
|
|
|
|
import (
|
|
"github.com/golang-jwt/jwt/v5"
|
|
domainAuth "github.com/haydenhargreaves/Potion/internal/domain/auth"
|
|
domainUser "github.com/haydenhargreaves/Potion/internal/domain/user"
|
|
)
|
|
|
|
type InjectedDependencies struct {
|
|
UserService domainUser.UserService
|
|
AuthService domainAuth.AuthService
|
|
}
|
|
|
|
type JwtClaims struct {
|
|
UserId int `json:"id"`
|
|
Email string `json:"email"`
|
|
jwt.RegisteredClaims
|
|
}
|