Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 0f92cfb

Browse files
authored
Merge pull request #84 from IdentityPython/docs
Docs, setup and readme for master branch
2 parents 47c8b71 + fbd76f3 commit 0f92cfb

3 files changed

Lines changed: 47 additions & 43 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# oidc-op
22

3+
![CI build](https://github.com/IdentityPython/oidc-op/workflows/oidc-op/badge.svg)
4+
![pypi](https://img.shields.io/pypi/v/oidcop.svg)
5+
![License](https://img.shields.io/badge/license-Apache%202-blue.svg)
6+
![Documentation Status](https://readthedocs.org/projects/oidcop/badge/?version=latest)
7+
![Python version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg)
8+
39
This project is a Python implementation of an **OIDC Provider** on top of [jwtconnect.io](https://jwtconnect.io/) that shows to you how to 'build' an OP using the classes and functions provided by oidc-op.
410

511
If you want to add or replace functionality the official documentation should be able to tell you how.

docs/source/contents/conf.rst

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The issuer ID of the OP, a unique value in URI format.
1313
session params
1414
--------------
1515

16-
Configuration parameters used by session manager
16+
Configuration parameters used by session manager::
1717

1818
"session_params": {
1919
"password": "__password_used_to_encrypt_access_token_sid_value",
@@ -32,19 +32,26 @@ Configuration parameters used by session manager
3232
}
3333
}
3434
}
35-
},
35+
},
36+
3637

3738
password
3839
########
3940

40-
Encryption key used to encrypt the SessionID (sid) in access_token.
41+
Optional. Encryption key used to encrypt the SessionID (sid) in access_token.
4142
If unset it will be random.
4243

4344

4445
salt
4546
####
4647

47-
Salt, value or filename, used in sub_funcs (pairwise, public) for creating the opaque hash of *sub* claim.
48+
Optional. Salt, value or filename, used in sub_funcs (pairwise, public) for creating the opaque hash of *sub* claim.
49+
50+
51+
sub_funcs
52+
#########
53+
54+
Optional. Functions involved in *sub*ject value creation.
4855
4956
------
5057
add_on
@@ -149,46 +156,30 @@ An example::
149156
backchannel_logout_session_supported: True
150157
check_session_iframe: https://127.0.0.1:5000/check_session_iframe
151158

152-
153-
-----------
154-
cookie_name
155-
-----------
156-
157-
An example::
158-
159-
"cookie_name": {
160-
"session": "oidc_op",
161-
"register": "oidc_op_rp",
162-
"session_management": "sman"
163-
},
164-
165-
-------------
166-
cookie_dealer
167-
-------------
159+
--------------
160+
cookie_handler
161+
--------------
168162

169163
An example::
170164

171-
"cookie_dealer": {
172-
"class": "oidcop.cookie.CookieDealer",
173-
"kwargs": {
174-
"sign_jwk": {
175-
"filename": "private/cookie_sign_jwk.json",
176-
"type": "OCT",
177-
"kid": "cookie_sign_key_id"
178-
},
179-
"enc_jwk": {
180-
"filename": "private/cookie_enc_jwk.json",
181-
"type": "OCT",
182-
"kid": "cookie_enc_key_id"
183-
},
184-
"default_values": {
185-
"name": "oidc_op",
186-
"domain": "127.0.0.1",
187-
"path": "/",
188-
"max_age": 3600
189-
}
165+
"cookie_handler": {
166+
"class": "oidcop.cookie_handler.CookieHandler",
167+
"kwargs": {
168+
"keys": {
169+
"private_path": f"{OIDC_JWKS_PRIVATE_PATH}/cookie_jwks.json",
170+
"key_defs": [
171+
{"type": "OCT", "use": ["enc"], "kid": "enc"},
172+
{"type": "OCT", "use": ["sig"], "kid": "sig"}
173+
],
174+
"read_only": False
175+
},
176+
"name": {
177+
"session": "oidc_op",
178+
"register": "oidc_op_rp",
179+
"session_management": "sman"
180+
}
190181
}
191-
},
182+
},
192183

193184
--------
194185
endpoint
@@ -444,7 +435,7 @@ An example::
444435

445436
"template_dir": "templates"
446437

447-
For any further customization of template here an example of what used in django-oidc-op
438+
For any further customization of template here an example of what used in django-oidc-op::
448439

449440
"authentication": {
450441
"user": {

setup.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17+
import os
1718
import re
1819
import sys
1920

@@ -43,25 +44,31 @@ def run_tests(self):
4344
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
4445
fd.read(), re.MULTILINE).group(1)
4546

47+
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
48+
README = readme.read()
49+
4650
setup(
4751
name="oidcop",
4852
version=version,
4953
description="Python implementation of OIDC Provider",
54+
long_description=README,
55+
long_description_content_type='text/markdown',
5056
author="Roland Hedberg",
5157
author_email="roland@catalogix.se",
5258
license="Apache 2.0",
53-
url='https://github.com/IdentityPython/oidcop',
59+
url='https://github.com/IdentityPython/oidc-op',
5460
package_dir={"": "src"},
5561
packages=["oidcop", 'oidcop/oidc', 'oidcop/authz',
5662
'oidcop/user_authn', 'oidcop/user_info',
5763
'oidcop/oauth2', 'oidcop/oidc/add_on', 'oidcop/oauth2/add_on',
5864
'oidcop/session', 'oidcop/token'],
5965
classifiers=[
60-
"Development Status :: 4 - Beta",
66+
"Development Status :: 5 - Production/Stable",
6167
"License :: OSI Approved :: Apache Software License",
6268
"Programming Language :: Python :: 3.6",
6369
"Programming Language :: Python :: 3.7",
6470
"Programming Language :: Python :: 3.8",
71+
"Programming Language :: Python :: 3.9",
6572
"Topic :: Software Development :: Libraries :: Python Modules"],
6673
install_requires=[
6774
"oidcmsg==1.3.2",

0 commit comments

Comments
 (0)