🐛 Fix internal token audience update isn't fully applied

This commit is contained in:
LittleSheep 2024-08-13 15:16:02 +08:00
parent 0ee3f1bc97
commit bdcc8de59b
2 changed files with 6 additions and 7 deletions

View File

@ -4,10 +4,9 @@
<option name="autoReloadType" value="ALL" /> <option name="autoReloadType" value="ALL" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":recycle: Separate application domain and token issuer"> <list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":sparkles: Use capital to deal with links">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/services/tokens.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/tokens.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/pkg/internal/server/api/oauth_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/oauth_api.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/settings.toml" beforeDir="false" afterPath="$PROJECT_DIR$/settings.toml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -154,7 +153,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value=":sparkles: Password reset &amp; user lookup API" />
<MESSAGE value=":recycle: Optimized the initial permission system" /> <MESSAGE value=":recycle: Optimized the initial permission system" />
<MESSAGE value=":zap: Optimized audit, event logging system&#10;:sparkles: Audit logs&#10;:sparkles: Admin edit user permissions" /> <MESSAGE value=":zap: Optimized audit, event logging system&#10;:sparkles: Audit logs&#10;:sparkles: Admin edit user permissions" />
<MESSAGE value=":sparkles: Admin force confirm account" /> <MESSAGE value=":sparkles: Admin force confirm account" />
@ -179,7 +177,8 @@
<MESSAGE value=":sparkles: Default user group" /> <MESSAGE value=":sparkles: Default user group" />
<MESSAGE value=":bug: Fix permissions in groups" /> <MESSAGE value=":bug: Fix permissions in groups" />
<MESSAGE value=":wastebasket: Clean up code" /> <MESSAGE value=":wastebasket: Clean up code" />
<option name="LAST_COMMIT_MESSAGE" value=":wastebasket: Clean up code" /> <MESSAGE value=":sparkles: Use capital to deal with links" />
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Use capital to deal with links" />
</component> </component>
<component name="VgoProject"> <component name="VgoProject">
<settings-migrated>true</settings-migrated> <settings-migrated>true</settings-migrated>

View File

@ -86,7 +86,7 @@ func authorizeThirdClient(c *fiber.Ctx) error {
user, user,
client, client,
strings.Split(scope, " "), strings.Split(scope, " "),
[]string{"passport", client.Alias}, []string{services.InternalTokenAudience, client.Alias},
c.IP(), c.IP(),
c.Get(fiber.HeaderUserAgent), c.Get(fiber.HeaderUserAgent),
&nonce, &nonce,
@ -107,7 +107,7 @@ func authorizeThirdClient(c *fiber.Ctx) error {
user, user,
client, client,
strings.Split(scope, " "), strings.Split(scope, " "),
[]string{"passport", client.Alias}, []string{services.InternalTokenAudience, client.Alias},
c.IP(), c.IP(),
c.Get(fiber.HeaderUserAgent), c.Get(fiber.HeaderUserAgent),
&nonce, &nonce,