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

Commit fbc95ad

Browse files
authored
Merge pull request #158 from IdentityPython/develop
OIDC Certification and FAPI profile
2 parents 05611f1 + 4a50cbb commit fbc95ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2185
-1591
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ conf.yaml
44
flask_op/debug.log
55
flask_op/static/
66
debug.log
7+
.pytest_cache/
78
# Created by .ignore support plugin (hsz.mobi)
89
### Python template
910
# Byte-compiled / optimized / DLL files
17.5 KB
Loading

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# import os
1414
# import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
16-
from recommonmark.parser import CommonMarkParser
16+
# from recommonmark.parser import CommonMarkParser
1717

1818
# -- Project information -----------------------------------------------------
1919

docs/source/contents/clients.rst

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
********************
2+
The clients database
3+
********************
4+
5+
Information kept about clients in the client database are to begin with the
6+
client metadata as defined in
7+
https://openid.net/specs/openid-connect-registration-1_0.html .
8+
9+
To that we have the following additions specified in OIDC extensions.
10+
11+
* https://openid.net/specs/openid-connect-rpinitiated-1_0.html
12+
+ post_logout_redirect_uri
13+
* https://openid.net/specs/openid-connect-frontchannel-1_0.html
14+
+ frontchannel_logout_uri
15+
+ frontchannel_logout_session_required
16+
* https://openid.net/specs/openid-connect-backchannel-1_0.html#Backchannel
17+
+ backchannel_logout_uri
18+
+ backchannel_logout_session_required
19+
* https://openid.net/specs/openid-connect-federation-1_0.html#rfc.section.3.1
20+
+ client_registration_types
21+
+ organization_name
22+
+ signed_jwks_uri
23+
24+
And finally we add a number of parameters that are OidcOP specific.
25+
These are described in this document.
26+
27+
--------------
28+
allowed_scopes
29+
--------------
30+
31+
Which scopes that can be returned to a client. This is used to filter
32+
the set of scopes a user can authorize release of.
33+
34+
-----------------
35+
token_usage_rules
36+
-----------------
37+
38+
There are usage rules for tokens. Rules are set per token type (the basic set is
39+
authorization_code, refresh_token, access_token and id_token).
40+
The possible rules are:
41+
42+
+ how many times they can be used
43+
+ if other tokens can be minted based on this token
44+
+ how fast they expire
45+
46+
A typical example (this is the default) would be::
47+
48+
"token_usage_rules": {
49+
"authorization_code": {
50+
"max_usage": 1
51+
"supports_minting": ["access_token", "refresh_token"],
52+
"expires_in": 600,
53+
},
54+
"refresh_token": {
55+
"supports_minting": ["access_token"],
56+
"expires_in": -1
57+
},
58+
}
59+
60+
This then means that access_tokens can be used any number of times,
61+
can not be used to mint other tokens and will expire after 300 seconds
62+
which is the default for any token. An authorization_code can only used once
63+
and it can be used to mint access_tokens and refresh_tokens. Note that normally
64+
an authorization_code is used to mint an access_token and a refresh_token at
65+
the same time. Such a dual minting is counted as one usage.
66+
And lastly an refresh_token can be used to mint access_tokens any number of
67+
times. An *expires_in* of -1 means that the token will never expire.
68+
69+
If token_usage_rules are defined in the client metadata then it will be used
70+
whenever a token is minted unless circumstances makes the OP modify the rules.
71+
72+
Also this does not mean that what is valid for a token can not be changed
73+
during run time.
74+
75+

docs/source/contents/conf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ client_db
199199

200200
If you're running an OP with static client registration you want to keep the
201201
registered clients in a database separate from the session database since
202-
it will change independent of the OP process. In this case you need this.
202+
it will change independent of the OP process. In this case you need *client_db*.
203203
If you are on the other hand only allowing dynamic client registration then
204-
keeping registered clients in the session database makes total sense.
204+
keeping registered clients only in the session database makes total sense.
205205

206206
The class you reference in the specification MUST be a subclass of
207207
oidcmsg.storage.DictType and have some of the methods a dictionary has.

docs/source/contents/session_management.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ add_grant
481481
+++++++++
482482
.. _add_grant:
483483

484-
add_grant(self, user_id, client_id, **kwargs)
484+
add_grant(self, user_id, client_id, \*\*kwargs)
485485

486486
find_token
487487
++++++++++

docs/source/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Welcome to Idpy OIDC-op Documentation
22
======================================
33

4+
.. image:: _images/oid-l-certification-mark-l-rgb-150dpi-90mm-300x157.png
5+
:width: 300
6+
:alt: OIDC Certified
7+
48
This project is a Python implementation of an **OIDC Provider** on top of `jwtconnect.io <https://jwtconnect.io/>`_
59
that shows you how to 'build' an OP using the classes and functions provided by oidc-op.
610

@@ -67,6 +71,12 @@ under the `Apache 2.0 <https://en.wikipedia.org/wiki/Apache_License>`_.
6771

6872
contents/developers.md
6973

74+
.. toctree::
75+
:maxdepth: 2
76+
:caption: Client database
77+
78+
contents/clients.rst
79+
7080
.. toctree::
7181
:maxdepth: 2
7282
:caption: FAQ

example/fastapi/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)