Skip to content

Commit 38ce71b

Browse files
author
Muhammad Luthfi Fahlevi
committed
refactor: remove unused variable and documentation
1 parent a5ac246 commit 38ce71b

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

docs/docs/configuration.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ service:
5151
host: localhost #required
5252
port: 8080 #required
5353
identity:
54-
headerkey_uuid: Compass-User-UUID #required
5554
headerkey_email: Compass-User-Email #optional
5655
provider_default_name: shield #optional
5756
grpc:
@@ -76,7 +75,6 @@ DB_PASSWORD=compass_password
7675
DB_SSLMODE=disable
7776
SERVICE_HOST=localhost
7877
SERVICE_PORT=8080
79-
SERVICE_IDENTITY_HEADERKEY_UUID=Compass-User-UUID
8078
SERVICE_IDENTITY_HEADERKEY_EMAIL=Compass-User-Email
8179
SERVICE_IDENTITY_PROVIDER_DEFAULT_NAME=shield
8280
SERVICE_GRPC_PORT=8081
@@ -262,8 +260,8 @@ Add client configurations in the same `~/compass.yaml` file in root of current d
262260
```yml
263261
client:
264262
host: localhost:8081
265-
serverheaderkey_uuid: Compass-User-UUID
266-
serverheadervalue_uuid: [email protected]
263+
serverheaderkey_email: Compass-User-Email
264+
serverheadervalue_email: [email protected]
267265
```
268266
269267
#### Required Header/Metadata in API

docs/docs/reference/configuration.md

-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ Compass's required variables to start using it.
5757
* Example value: `disable`
5858
* Type: `optional`
5959
* PostgreSQL DB SSL mode to connect.
60-
### `IDENTITY_UUID_HEADER`
61-
* Example value: `Compass-User-UUID`
62-
* Type: `required`
63-
* Header key to accept Compass User UUID. See [User](../concepts/user.md) for more information about the usage.
6460
### `IDENTITY_EMAIL_HEADER`
6561
* Example value: `Compass-User-Email`
6662
* Type: `optional`

internal/server/server.go

-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ func (cfg Config) grpcAddr() string { return fmt.Sprintf("%s:%d", cfg.Host, cfg.
4747

4848
type IdentityConfig struct {
4949
// User Identity
50-
HeaderKeyUUID string `yaml:"headerkey_uuid" mapstructure:"headerkey_uuid" default:"Compass-User-UUID"`
51-
HeaderValueUUID string `yaml:"headervalue_uuid" mapstructure:"headervalue_uuid" default:"[email protected]"`
5250
HeaderKeyEmail string `yaml:"headerkey_email" mapstructure:"headerkey_email" default:"Compass-User-Email"`
5351
HeaderValueEmail string `yaml:"headervalue_email" mapstructure:"headervalue_email" default:"[email protected]"`
5452
ProviderDefaultName string `yaml:"provider_default_name" mapstructure:"provider_default_name" default:""`
@@ -178,8 +176,6 @@ func makeHeaderMatcher(c Config) func(key string) (string, bool) {
178176
switch strings.ToLower(key) {
179177
case strings.ToLower(c.Identity.HeaderKeyEmail):
180178
return key, true
181-
case strings.ToLower(c.Identity.HeaderKeyUUID):
182-
return key, true
183179
default:
184180
return runtime.DefaultHeaderMatcher(key)
185181
}

test/e2e_test/helper_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
var (
1717
SERVER_HOST = "http://localhost:8080"
18-
IDENTITY_HEADER_KEY_UUID = "Compass-User-UUID"
1918
IDENTITY_HEADER_KEY_EMAIL = "Compass-User-Email"
2019
)
2120

0 commit comments

Comments
 (0)