Skip to content

Commit d49a283

Browse files
authored
Fix config unmarshaling (#36)
1 parent 8e589d5 commit d49a283

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

internal/config/unmarshal.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,21 @@ func (c *MCPClientConfig) UnmarshalJSON(data []byte) error {
115115
func (o *OAuthAuthConfig) UnmarshalJSON(data []byte) error {
116116
// Use a raw type to parse references
117117
type rawOAuth struct {
118-
Kind AuthKind `json:"kind"`
119-
Issuer json.RawMessage `json:"issuer"`
120-
GCPProject json.RawMessage `json:"gcpProject"`
121-
AllowedDomains []string `json:"allowedDomains"`
122-
AllowedOrigins []string `json:"allowedOrigins"`
123-
TokenTTL string `json:"tokenTtl"`
124-
Storage string `json:"storage"`
125-
FirestoreDatabase string `json:"firestoreDatabase,omitempty"`
126-
FirestoreCollection string `json:"firestoreCollection,omitempty"`
127-
GoogleClientID json.RawMessage `json:"googleClientId"`
128-
GoogleClientSecret json.RawMessage `json:"googleClientSecret"`
129-
GoogleRedirectURI json.RawMessage `json:"googleRedirectUri"`
130-
JWTSecret json.RawMessage `json:"jwtSecret"`
131-
EncryptionKey json.RawMessage `json:"encryptionKey,omitempty"`
118+
Kind AuthKind `json:"kind"`
119+
Issuer json.RawMessage `json:"issuer"`
120+
GCPProject json.RawMessage `json:"gcpProject"`
121+
AllowedDomains []string `json:"allowedDomains"`
122+
AllowedOrigins []string `json:"allowedOrigins"`
123+
TokenTTL string `json:"tokenTtl"`
124+
Storage string `json:"storage"`
125+
FirestoreDatabase string `json:"firestoreDatabase,omitempty"`
126+
FirestoreCollection string `json:"firestoreCollection,omitempty"`
127+
GoogleClientID json.RawMessage `json:"googleClientId"`
128+
GoogleClientSecret json.RawMessage `json:"googleClientSecret"`
129+
GoogleRedirectURI json.RawMessage `json:"googleRedirectUri"`
130+
JWTSecret json.RawMessage `json:"jwtSecret"`
131+
EncryptionKey json.RawMessage `json:"encryptionKey,omitempty"`
132+
DangerouslyAcceptIssuerAudience bool `json:"dangerouslyAcceptIssuerAudience,omitempty"`
132133
}
133134

134135
var raw rawOAuth
@@ -143,6 +144,7 @@ func (o *OAuthAuthConfig) UnmarshalJSON(data []byte) error {
143144
o.Storage = raw.Storage
144145
o.FirestoreDatabase = raw.FirestoreDatabase
145146
o.FirestoreCollection = raw.FirestoreCollection
147+
o.DangerouslyAcceptIssuerAudience = raw.DangerouslyAcceptIssuerAudience
146148

147149
// Parse TokenTTL duration
148150
if raw.TokenTTL != "" {

0 commit comments

Comments
 (0)