Skip to content

Commit

Permalink
geofencing docs (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli authored Oct 25, 2023
2 parents 45f355f + e1f36b4 commit 7c0b67b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
17 changes: 3 additions & 14 deletions docusaurus/video/docusaurus/docs/api/basics/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,7 @@ client.create_token(user_id=user_id, exp, iat, call_cids)
</TabItem>
</Tabs>

## Token expiration and token providers
## Provisioning token in production

At a high level, the Token Provider is an endpoint on your server that can perform the following sequence of tasks:

1. Receive information about a user from the front end.

2. Validate that user information against your system.

3. Provide a User-ID corresponding to that user to the server client's token creation method.

4. Return that token to the front end.

Tokens can only be safely generated from a server. This means you will need to implement a Token Provider prior to deploying your application to production. To conduct development before implementing a Token Provider, you will need to disable token authentication.

Tokens also should have an expiration date to ensure adequate security. Once a token is expired, cliend-side SDKs can automatically call an endpoint to refresh the token, this endpoint should also be part of the Token Provider implementation.
Your authentication service is responsible for generating token for your users. It is highly recommended to always create tokens with an expiration.
All SDK make it easy to automatically re-fetch tokens from your backend servers with token providers when they expire.
19 changes: 18 additions & 1 deletion docusaurus/video/docusaurus/docs/api/call_types/geofencing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ slug: /call_types/geofencing
title: Geofencing
---

With geofencing, you can define which edge nodes are utilized for video calls within specific geo-fenced areas.
You can set geo-fences to a call type or specify when creating a new call. Multiple geo-fences can be used at the same time.


At this present you can only select from a predefined list of geo-fences:

| Name | Description |
|-------------------|-----------------------------------------------------------------------------------------------------------------|
| european_union | The list of countries that are part of european union |
| united_states | Only selects edges in US |
| canada | Only selects edges in Canada |
| united_kingdom | Only selects edges in the United Kingdom |
| india | Only selects edges in India |
| china_exclusion | Excludes edges running in mainland China (currently Stream edge infrastructure does not have any edge in China) |
| russia_exclusion | Excludes edges running in Russia |
| belarus_exclusion | Excludes edges running in Belarus |

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand All @@ -27,7 +44,7 @@ call.create({
created_by_id: 'john',
settings_override: {
geofencing: {
names: ['european_union'],
names: ['european_union', 'united_states'],
},
},
},
Expand Down
8 changes: 0 additions & 8 deletions docusaurus/video/docusaurus/docs/api/streaming/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ const response = await call.getOrCreate({
});
```

</TabItem>
<TabItem value="py" label="Python">

```py
def hello_word():
print("Hello world")
```

</TabItem>
</Tabs>

Expand Down

0 comments on commit 7c0b67b

Please sign in to comment.