Skip to content

Commit 9cbc40f

Browse files
committed
refactor(server): drop the gateway context accessor IdentityFrom replaced
The route wrapper was the only caller, and it now reads the whole identity at once. An exported accessor nothing reaches is a shape the next handler copies for no reason.
1 parent fb05f3d commit 9cbc40f

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

server/api/pkg/gateway/context.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ func (c *Context) DeviceUID() string {
120120
return c.Request().Header.Get("X-Device-UID")
121121
}
122122

123-
// APIKey returns the API key the request authenticated with, got from gateway. It is empty when
124-
// the request was not authenticated with an API key.
125-
func (c *Context) APIKey() string {
126-
return c.Request().Header.Get("X-API-Key")
127-
}
128-
129123
// Username returns the username got from JWT through gateway.
130124
func (c *Context) Username() *models.Username {
131125
username := c.Request().Header.Get("X-Username")

0 commit comments

Comments
 (0)