File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type Token struct {
30
30
Enabled bool `bson:"enabled" json:"enabled"` // required
31
31
32
32
// AuthSources contains the configuration for authentication sources.
33
- AuthSources `bson:",inline" json:"- "`
33
+ AuthSources `bson:",inline" json:",inline "`
34
34
35
35
// EnableClientCertificate allows to create dynamic keys based on certificates.
36
36
//
Original file line number Diff line number Diff line change 1
1
package oas
2
2
3
3
import (
4
- "encoding/json"
5
4
"sort"
6
5
"testing"
7
6
@@ -277,20 +276,6 @@ func TestOAS_Token(t *testing.T) {
277
276
convertedOAS .fillToken (api )
278
277
279
278
assert .Equal (t , oas , convertedOAS )
280
-
281
- // Make sure AuthSources are not serialized into json.
282
- token .Query = & AuthSource {Enabled : true }
283
- token .Header = & AuthSource {Enabled : true }
284
- token .Cookie = & AuthSource {Enabled : true }
285
- bytes , err := json .Marshal (token )
286
- assert .NoError (t , err )
287
-
288
- var unmarshalledToken Token
289
- err = json .Unmarshal (bytes , & unmarshalledToken )
290
- assert .NoError (t , err )
291
- assert .Nil (t , unmarshalledToken .Query )
292
- assert .Nil (t , unmarshalledToken .Header )
293
- assert .Nil (t , unmarshalledToken .Cookie )
294
279
}
295
280
296
281
func TestOAS_Token_MultipleSecuritySchemes (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments