https://github.com/ahopkins/sscopes-python
An implementation of Structured Scopes in Python
https://github.com/ahopkins/sscopes-python
authentication permissions python scopes structured-scopes
Last synced: 10 months ago
JSON representation
An implementation of Structured Scopes in Python
- Host: GitHub
- URL: https://github.com/ahopkins/sscopes-python
- Owner: ahopkins
- License: mit
- Created: 2018-04-29T08:22:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T12:11:44.000Z (about 7 years ago)
- Last Synced: 2025-03-18T18:56:49.597Z (about 1 year ago)
- Topics: authentication, permissions, python, scopes, structured-scopes
- Language: Python
- Homepage: https://ahopkins.github.io/structured-scopes/
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
# Structured Scopes
[View the documentation](https://ahopkins.github.io/structured-scopes/) to learn more.
## Abstract
This is an abstract specification for the use of structured scopes in permission granting utilities.
## Introduction
The goal of this endeavor is to standardize and define the meaning, and usage of "scopes" for implementation in an authorization utility. It is [licensed](https://github.com/ahopkins/structured-scopes/blob/master/LICENSE) under the [CC0 1.0 Universal (CC0 1.0)
Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/) All other copyrights and other rights, if any, are hereby reserved.
## Purpose
The purpose of "scoping" is to provide a pass/fail response to a request for permission on a defined resource to authorized clients having the requisite permission level. A common application would be for permissioning on protected resources, for example, on web requests.
## Install
```
pip install sscopes
```
## Brief
Examples in brief:
```
Base: user
Inbound: foobar
Result: fail
Base: user
Inbound: user
Result: pass
Base: user:write
Inbound: user
Result: pass
Base: user:write
Inbound: user:read
Result: fail
```
See [more examples](https://ahopkins.github.io/structured-scopes/examples/)
## Implementations
- Python - [source](https://github.com/ahopkins/sscopes-python) | [docs](https://ahopkins.github.io/structured-scopes/implementations/)
- Javascript - [source](https://github.com/ahopkins/sscopes-javascript) | [docs](https://ahopkins.github.io/structured-scopes/implementations/)