diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6f64fc4..936825d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,65 +4,12 @@
-
-
-
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -209,7 +156,6 @@
-
@@ -234,7 +180,8 @@
-
+
+
true
diff --git a/pkg/internal/server/api/well_known_api.go b/pkg/internal/server/api/well_known_api.go
index df62e03..1c95935 100644
--- a/pkg/internal/server/api/well_known_api.go
+++ b/pkg/internal/server/api/well_known_api.go
@@ -12,7 +12,7 @@ func getOidcConfiguration(c *fiber.Ctx) error {
basepath := fmt.Sprintf("https://%s", domain)
return c.JSON(fiber.Map{
- "issuer": basepath,
+ "issuer": viper.GetString("security.issuer"),
"authorization_endpoint": fmt.Sprintf("%s/authorize", basepath),
"token_endpoint": fmt.Sprintf("%s/api/auth/token", basepath),
"userinfo_endpoint": fmt.Sprintf("%s/api/users/me", basepath),
diff --git a/pkg/internal/services/jwt.go b/pkg/internal/services/jwt.go
index 9391ef0..00365e1 100644
--- a/pkg/internal/services/jwt.go
+++ b/pkg/internal/services/jwt.go
@@ -20,7 +20,7 @@ type PayloadClaims struct {
Nick string `json:"preferred_username,omitempty"`
Email string `json:"email,omitempty"`
- // Additonal Stuff
+ // Additional Stuff
AuthorizedParties string `json:"azp,omitempty"`
Nonce string `json:"nonce,omitempty"`
Type string `json:"typ"`
@@ -44,7 +44,7 @@ func EncodeJwt(id string, typ, sub, sed string, nonce *string, aud []string, exp
RegisteredClaims: jwt.RegisteredClaims{
Subject: sub,
Audience: aud,
- Issuer: fmt.Sprintf("https://%s", viper.GetString("domain")),
+ Issuer: viper.GetString("security.issuer"),
ExpiresAt: jwt.NewNumericDate(exp),
NotBefore: jwt.NewNumericDate(time.Now()),
IssuedAt: jwt.NewNumericDate(time.Now()),
diff --git a/pkg/internal/services/ticket.go b/pkg/internal/services/ticket.go
index 188e145..681320e 100644
--- a/pkg/internal/services/ticket.go
+++ b/pkg/internal/services/ticket.go
@@ -11,7 +11,7 @@ import (
"github.com/samber/lo"
)
-const InternalTokenAudience = "passport"
+const InternalTokenAudience = "solar-network"
func DetectRisk(user models.Account, ip, ua string) bool {
var clue int64
diff --git a/settings.toml b/settings.toml
index 821d584..ace5b52 100644
--- a/settings.toml
+++ b/settings.toml
@@ -5,6 +5,8 @@ bind = "0.0.0.0:8444"
grpc_bind = "0.0.0.0:7444"
domain = "localhost"
+domain = "id.solsynth.dev"
+
content_endpoint = "https://usercontent.solsynth.dev"
default_user_group = 1
@@ -19,6 +21,7 @@ print_routes = false
addr = "127.0.0.1:7442"
[security]
+issuer = "https://solsynth.dev"
cookie_domain = "localhost"
cookie_samesite = "Lax"
access_token_duration = 300