turn-ephemeral-credentials


Nameturn-ephemeral-credentials JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryGenerate time limited, ephemeral, long term credentials to authenticate usage of a turn server.
upload_time2023-09-05 01:39:06
maintainer
docs_urlNone
author
requires_python>=3.8.10
licenseMIT License Copyright (c) 2023 p4irin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords turn stun ice
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TURN Ephemeral Credentials - v1.0.1

Generate time limited, i.e. ephemeral, long term credentials to authenticate against a TURN server. The _default_ duration for the validity of the credentials is set to _one day_ as recommended in [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=ttl%3A%20the%20duration%20for%20which%20the%20username%20and%20password%20are%20valid%2C%0A%20%20%20%20%20%20in%20seconds.%20%20A%20value%20of%20one%20day%20(86400%20seconds)%20is%20recommended). The same document describes how to generate the _username_ and _password_ [here](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=username%3A%20the%20TURN,algorithm%0A%20%20%20%20%20%20and%20secret.).

## Stack

- Python 3.8.10 on Ubuntu 20.04.2 LTS

## Installation

### From PyPI

```bash
(venv) $ pip install turn-ephemeral-credentials
```

### From GitHub

```bash
(venv) $ pip install git+https://github.com/p4irin/turn_ephemeral_credentials.git
```

## Usage

```python
from turn_ephemeral_credentials import generate


# Generate a username and use the default ttl of one day
credentials = generate(shared_secret='A shared secret with a TURN server')

# Pass a username and use the default ttl
credentials = generate(username='username', shared_secret='A shared secret with a TURN server')

# Generate a username and use a ttl of half a day
credentials = generate(shared_secret='A shared secret with a TURN server', ttl=43200)
```

## Reference

- [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1)
- [coturn](https://github.com/coturn/coturn)
- [RFC 5766. Traversal Using Relays around NAT (TURN):Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5766)
- [RFC 5389, Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5389#section-10.2)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "turn-ephemeral-credentials",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.10",
    "maintainer_email": "",
    "keywords": "turn,stun,ice",
    "author": "",
    "author_email": "p4irin <139928764+p4irin@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/d3/ee/38716611f798a485fb1be00ed57a33605355468d886cf2b6c0fab843a849/turn_ephemeral_credentials-1.0.1.tar.gz",
    "platform": null,
    "description": "# TURN Ephemeral Credentials - v1.0.1\n\nGenerate time limited, i.e. ephemeral, long term credentials to authenticate against a TURN server. The _default_ duration for the validity of the credentials is set to _one day_ as recommended in [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=ttl%3A%20the%20duration%20for%20which%20the%20username%20and%20password%20are%20valid%2C%0A%20%20%20%20%20%20in%20seconds.%20%20A%20value%20of%20one%20day%20(86400%20seconds)%20is%20recommended). The same document describes how to generate the _username_ and _password_ [here](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=username%3A%20the%20TURN,algorithm%0A%20%20%20%20%20%20and%20secret.).\n\n## Stack\n\n- Python 3.8.10 on Ubuntu 20.04.2 LTS\n\n## Installation\n\n### From PyPI\n\n```bash\n(venv) $ pip install turn-ephemeral-credentials\n```\n\n### From GitHub\n\n```bash\n(venv) $ pip install git+https://github.com/p4irin/turn_ephemeral_credentials.git\n```\n\n## Usage\n\n```python\nfrom turn_ephemeral_credentials import generate\n\n\n# Generate a username and use the default ttl of one day\ncredentials = generate(shared_secret='A shared secret with a TURN server')\n\n# Pass a username and use the default ttl\ncredentials = generate(username='username', shared_secret='A shared secret with a TURN server')\n\n# Generate a username and use a ttl of half a day\ncredentials = generate(shared_secret='A shared secret with a TURN server', ttl=43200)\n```\n\n## Reference\n\n- [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1)\n- [coturn](https://github.com/coturn/coturn)\n- [RFC 5766. Traversal Using Relays around NAT (TURN):Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5766)\n- [RFC 5389, Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5389#section-10.2)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 p4irin  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Generate time limited, ephemeral, long term credentials to authenticate usage of a turn server.",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/p4irin/turn_ephemeral_credentials/issues",
        "Homepage": "https://github.com/p4irin/turn_ephemeral_credentials"
    },
    "split_keywords": [
        "turn",
        "stun",
        "ice"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad9afdeaac0a27c783b74e554d8a3dfd07a69a4d9c19836167b6a46998b4c507",
                "md5": "009982b5a5ad7d88fe48d4f949c4e2f9",
                "sha256": "a404f4dcb40a00e14da3c0082dd16707415881b2f2f372457952cf9e79fe29fd"
            },
            "downloads": -1,
            "filename": "turn_ephemeral_credentials-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "009982b5a5ad7d88fe48d4f949c4e2f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.10",
            "size": 4728,
            "upload_time": "2023-09-05T01:39:04",
            "upload_time_iso_8601": "2023-09-05T01:39:04.379907Z",
            "url": "https://files.pythonhosted.org/packages/ad/9a/fdeaac0a27c783b74e554d8a3dfd07a69a4d9c19836167b6a46998b4c507/turn_ephemeral_credentials-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3ee38716611f798a485fb1be00ed57a33605355468d886cf2b6c0fab843a849",
                "md5": "6a62b5fab9d11793d483b54ae258bfeb",
                "sha256": "845ad661230da7b56ab8bcb1f26790b1ecab55079ad2c03fb025728e0b268abb"
            },
            "downloads": -1,
            "filename": "turn_ephemeral_credentials-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6a62b5fab9d11793d483b54ae258bfeb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.10",
            "size": 4287,
            "upload_time": "2023-09-05T01:39:06",
            "upload_time_iso_8601": "2023-09-05T01:39:06.031095Z",
            "url": "https://files.pythonhosted.org/packages/d3/ee/38716611f798a485fb1be00ed57a33605355468d886cf2b6c0fab843a849/turn_ephemeral_credentials-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-05 01:39:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "p4irin",
    "github_project": "turn_ephemeral_credentials",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "turn-ephemeral-credentials"
}
        
Elapsed time: 0.17523s