Skip to content

Commit 94bab22

Browse files
committed
feat: change testData for traefik
1 parent bce0d38 commit 94bab22

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.traefik.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import: github.com/s00rk/firebase-verify-token
33
type: middleware
44
summary: Validate JWT token generated by Firebase and add claims and user id to the header like fb-userid and fbclaim-<key>
55
testData:
6-
project_id: firebase_project_id
6+
ProjectID: firebase_project_id

validatetoken.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
type Config struct {
12-
ProjectID string `json:"project_id"`
12+
ProjectID string `json:"ProjectID"`
1313
}
1414

1515
type FirebaseJwtPlugin struct {
@@ -23,7 +23,7 @@ func CreateConfig() *Config {
2323

2424
func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
2525
if len(config.ProjectID) == 0 || strings.TrimSpace(config.ProjectID) == "" {
26-
return nil, fmt.Errorf("configuration incorrect, missing project_id")
26+
return nil, fmt.Errorf("configuration incorrect, missing ProjectID")
2727
}
2828

2929
idTokenVerifier, err := newIDTokenVerifier(context.Background(), config.ProjectID)

0 commit comments

Comments
 (0)