tokers commented on code in PR #1009:
URL:
https://github.com/apache/apisix-ingress-controller/pull/1009#discussion_r871188540
##########
pkg/kube/apisix/apis/config/v2/types.go:
##########
@@ -180,6 +181,14 @@ type ApisixRouteAuthenticationKeyAuth struct {
Header string `json:"header,omitempty" yaml:"header,omitempty"`
}
+// ApisixRouteAuthenticationJwtAuth is the jwtAuth-related
Review Comment:
```suggestion
// ApisixRouteAuthenticationJwtAuth is the jwt auth related
```
##########
pkg/kube/apisix/apis/config/v2/types.go:
##########
@@ -330,6 +339,7 @@ type ApisixConsumerSpec struct {
type ApisixConsumerAuthParameter struct {
BasicAuth *ApisixConsumerBasicAuth `json:"basicAuth,omitempty"
yaml:"basicAuth"`
KeyAuth *ApisixConsumerKeyAuth `json:"keyAuth,omitempty"
yaml:"keyAuth"`
+ JwtAuht *ApisixConsumerJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth"`
Review Comment:
```suggestion
JwtAuth *ApisixConsumerJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth"`
```
##########
pkg/kube/apisix/apis/config/v2/types.go:
##########
@@ -330,6 +339,7 @@ type ApisixConsumerSpec struct {
type ApisixConsumerAuthParameter struct {
BasicAuth *ApisixConsumerBasicAuth `json:"basicAuth,omitempty"
yaml:"basicAuth"`
KeyAuth *ApisixConsumerKeyAuth `json:"keyAuth,omitempty"
yaml:"keyAuth"`
+ JwtAuht *ApisixConsumerJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth"`
Review Comment:
```suggestion
JwtAuth *ApisixConsumerJwtAuth `json:"jwtAuth,omitempty"
yaml:"jwtAuth"`
```
##########
pkg/types/apisix/v1/plugin_types.go:
##########
@@ -70,6 +70,19 @@ type BasicAuthConsumerConfig struct {
Password string `json:"password"`
}
+// JwtAuthConsumerConfig is the rule config for basic-auth plugin
Review Comment:
```suggestion
// JwtAuthConsumerConfig is the rule config for jwt-auth plugin
```
##########
samples/deploy/crd/v1/ApisixConsumer.yaml:
##########
@@ -98,3 +99,37 @@ spec:
minLength: 1
required:
- name
+ jwtAuth:
+ type: object
+ oneOf:
+ - required: ["value"]
+ - required: ["secretRef"]
+ properties:
+ value:
+ type: object
+ properties:
+ key:
+ type: string
+ minLength: 1
+ secret:
+ type: string
+ public_key:
+ type: string
+ private_key:
+ type: string
+ algorithm:
+ type: string
+ exp:
+ type: integer
+ base64_secret:
+ type: boolean
+ required:
+ - key
+ secretRef:
+ type: object
+ properties:
+ name:
+ type: string
+ minLength: 1
+ required:
+ - name
Review Comment:
Add the EOL symbol.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]