adnanrahic / adnanrahic/a-crash-course-on-serverless-auth

Unit test handler which uses the verify-token authorizer

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
160
Fork
38
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I am writing unit test using jest on the auth/AuthHandler.me which uses the verify-token authorizer.
How do I pass the Authorization token in the tests so it invokes the verify token authorizer as well before executing the handler so that the principalId is already set(from the authorizer) when the data reaches the handler.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by reading auth/AuthHandler.me and locating the verify-token authorizer mentioned in the issue. Determine how the Jest test invokes the handler and how the Authorization token is supplied; done means a test exercises the authorizer before the handler and verifies that principalId reaches it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, javascript, mongodb, nodejs
Lĩnh vực
authentication, backend, testing
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.