Skip to content

Commit

Permalink
Merge pull request #3 from permitio/task/oded/adding-get-api-key-inst…
Browse files Browse the repository at this point in the history
…ructions

adding get api key instructions
  • Loading branch information
obsd authored Jan 9, 2022
2 parents 01724ce + 3724a4e commit 1c2534c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/reference/SDKs/nodejs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ npm install permitio
const { Permit } = require("permitio");
```

3. Create a new instance of the SDK:
3. Create a new instance of the SDK:
You can find instructions on getting an API key [here](../../tutorials/quickstart#2-get-permitio-api-key)

```js
// This line initializes the SDK and connects your Node.js app
Expand Down
5 changes: 3 additions & 2 deletions docs/reference/SDKs/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ Create a file called test.py:
touch test.py
```

Copy the following code inside test.py and replace with your `api key` and `user-object`:
Copy the following code inside test.py and replace with your `api key` and `user-object`:
You can find instructions on getting an API key [here](../../tutorials/quickstart#2-get-permitio-api-key)

```python
import asyncio
Expand Down Expand Up @@ -122,4 +123,4 @@ Now that your application is ready, let's run it:
uvicorn test:app --reload --port=4000
```

Finally, go to http://localhost:4000 to see the outcome of the permission check.
Finally, go to [http://localhost:4000](http://localhost:4000) to see the outcome of the permission check.
13 changes: 10 additions & 3 deletions docs/tutorials/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@ In this tutorial, we will show you how to integrate your app with Permit.io in a
We provide a Policy-Decision-Point - aka an authorization microservice, as a container for you to use.
Follow these steps to install:

1. Pull our PDP container from Docker Hub ([Click here to install Docker](https://docs.docker.com/get-docker/])):
#### 1. Pull our PDP container from Docker Hub ([Click here to install Docker](https://docs.docker.com/get-docker/])):

```
docker pull permitio/pdp:latest
```
#### 2. Get Permit.io API key

2. Run the container (replace `<YOUR_API_KEY>` with your API key):
Navigate to [Project management](https://app.permit.io/project-management).
Find the active environment with the green dot on the icon.
Click on "Copy secret key" button of the active environment.
Or:
Click on your user icon at the top right of the screen and click there "Copy SDK secret key".

#### 3. Run the container (replace `<YOUR_API_KEY>` with your API key):

```
docker run \
Expand All @@ -33,4 +40,4 @@ docker run \
1. [Node.js](/reference/SDKs/nodejs)
2. [Python](/reference/SDKs/python)

... more SDKs coming soon
more SDKs coming soon...

0 comments on commit 1c2534c

Please sign in to comment.