From 43e93ac48f099465885e9a82aa6dc334e82bfeb0 Mon Sep 17 00:00:00 2001 From: Jeni Rainer <86104312+jenirain@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:38:30 +0200 Subject: [PATCH] Readme updates (#1) * minor updates to NOTICE and readme * simplifying notice after rereading the details and adding a section for running tests in contributing. * fixed test section * adding bug-report.md and draft of npmignore * adding issue templates; fixing labels in README issue links * deleting .npmignore- not needed for files directive in package.json --- .github/ISSUE_TEMPLATE/bug-report.md | 23 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 9 +++++++++ .github/ISSUE_TEMPLATE/help.md | 7 +++++++ CONTRIBUTING.md | 6 ++++++ NOTICE | 3 ++- README.md | 17 +++++++++++------ 6 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/help.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..98017b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,23 @@ +--- +name: Bug Report +about: Report a bug encountered while using cognito-at-edge +labels: kind/bug +--- + + + +#### What happened: + +#### What did you expect to have happen: + +#### How to reproduce this (as precisely and succinctly as possible): + +#### Anything else you think we should know? + +#### Environment: +- version of cognito-at-edge being used: +- node version of code base which uses cognito-at-edge: +- other: + +- diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..eb25104 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,9 @@ +--- +name: Enhancement Tracking Issue +about: Provide supporting details for a feature in development +labels: kind/feature +--- + +#### What would you like to be added: + +#### Why is this needed: \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/help.md b/.github/ISSUE_TEMPLATE/help.md new file mode 100644 index 0000000..2687db1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help.md @@ -0,0 +1,7 @@ +--- +name: "⁉️ Need help with cognito-at-edge?" +about: Please file an issue in our help repo. + +--- + +#### How can we help? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 914e074..7d457e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,12 @@ GitHub provides additional document on [forking a repository](https://help.githu ## Finding contributions to work on Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. +## Testing the code +Tests are written using jest. To run tests invoke +``` +npm test +``` + ## Code of Conduct This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). diff --git a/NOTICE b/NOTICE index b8d0d46..c34d7ad 100644 --- a/NOTICE +++ b/NOTICE @@ -1 +1,2 @@ -Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +cognito-at-edge +Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. \ No newline at end of file diff --git a/README.md b/README.md index 735343f..dc50798 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ *Serverless authentication solution to protect your website or Amplify application.* ![Architecture](./doc/architecture.png) -This NodeJS library authenticate CloudFront requests with Lambda@Edge based and a Cognito UserPool. + +This NodeJS library authenticates CloudFront requests with Lambda@Edge based on a Cognito UserPool. ### Requirements * NodeJS v10+ (install with [NVM](https://github.com/nvm-sh/nvm)) @@ -15,7 +16,7 @@ Install the `cognito-at-edge` package: npm install --save cognito-at-edge ``` -Create the a Lambda@Edge function with the following content and modify the parameters based on your configuration: +Create a Lambda@Edge function with the following content and modify the parameters based on your configuration: ``` const { Authenticator } = require('cognito-at-edge'); @@ -34,7 +35,7 @@ exports.handler = async (request) => authenticator.handle(request); ### Getting started -Based on your requirements you can use of the solution below. They all provide the complete infrastructure leveraging `cognito-at-edge` to protect a website or an Amplify application. +Based on your requirements you can use one of the solutions below. They all provide the complete infrastructure leveraging `cognito-at-edge` to protect a website or an Amplify application. *WIP* @@ -62,8 +63,12 @@ const authenticator = new Authenticator( ... ); exports.handler = async (request) => authenticator.handle(request); ``` -### Contact -Please fill an issue in the Github repository ([Open issues](https://github.com/awslabs/cognito-at-edge/issues)). +### Getting Help +The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/awslabs/cognito-at-edge/issues/new/choose) +and choose from one of our templates for [bug reports](https://github.com/awslabs/cognito-at-edge/issues/new?assignees=&labels=bug%2C+needs-triage&template=---bug-report.md&title=), +[feature requests](https://github.com/awslabs/cognito-at-edge/issues/new?assignees=&labels=feature-request&template=---feature-request.md&title=) or +[question](https://github.com/awslabs/cognito-at-edge/issues/new?assignees=&labels=question%2C+needs-triage&template=---questions---help.md&title=). ## License -This project is licensed under the Apache-2.0 License. +This project is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), see +LICENSE.txt and NOTICE.txt for more information.