Adding structures for iot custom authorizer request/response #67
Adding structures for iot custom authorizer request/response #67
Conversation
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
=======================================
Coverage 72.22% 72.22%
=======================================
Files 19 19
Lines 738 738
=======================================
Hits 533 533
Misses 138 138
Partials 67 67 Continue to review full report at Codecov.
|
|
@bmoffatt any chance we can get this merged? |
bmoffatt
left a comment
There was a problem hiding this comment.
The request and response types do not match the linked documentation. Its possible that they've drifted since the PR was created
Yeah, it looks like the contract changed a lot since I made these changes. I've updated everything now and addressed all the comments. |
Codecov Report
@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 71.63% 71.63%
=======================================
Files 19 19
Lines 1040 1040
=======================================
Hits 745 745
Misses 228 228
Partials 67 67 Continue to review full report at Codecov.
|
|
@bmoffatt Could you take another look? |
.idea/aws-lambda-go.iml
Outdated
| @@ -0,0 +1,10 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
project files need to be removed :)
events/iot.go
Outdated
| } | ||
|
|
||
| type IoTMqttContext struct { | ||
| ClientId string `json:"clientId"` |
There was a problem hiding this comment.
style: general field and type naming conventions should consistently capitalize these initialisms
Id -> ID
HTTP -> HTTP
Tls->TLS
Mqtt -> MQTT
events/policy.go
Outdated
| @@ -0,0 +1,7 @@ | |||
| package events | |||
There was a problem hiding this comment.
going to delete this one before merging, feel free to re-open if this one was needed for something!
There was a problem hiding this comment.
I think it was used before, but not anymore after resolving the most recent merge conflicts since it was added already somewhere else with a different name. Thanks for cleaning up!
to satisfy the linter
|
@ynori7 @bmoffatt Unfortunately, I think you referenced the wrong request structure. The actual structure is documented here: https://docs.aws.amazon.com/iot/latest/developerguide/config-custom-auth.html I will file a bug. I guess for some reason the IoT Core developers decided to make the test request totally different from the real request. |
Adding structures to fit to the documentation here: https://docs.aws.amazon.com/iot/latest/apireference/API_TestInvokeAuthorizer.html