-
Notifications
You must be signed in to change notification settings - Fork 564
Adding structures for iot custom authorizer request/response #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project files need to be removed :)
events/iot.go
Outdated
} | ||
|
||
type IoTMqttContext struct { | ||
ClientId string `json:"clientId"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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