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

Commit 524e4e9

Browse files
committed
fix: acr value in documentation and examples
1 parent 5c6d678 commit 524e4e9

6 files changed

Lines changed: 12 additions & 13 deletions

File tree

doc/source/contents/conf.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ An example::
7979

8080
"authentication": {
8181
"user": {
82-
"acr": "oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD",
82+
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
8383
"class": "oidcop.user_authn.user.UserPassJinja2",
8484
"kwargs": {
8585
"verify_endpoint": "verify/user",
@@ -368,7 +368,7 @@ An example::
368368
"kwargs": {
369369
"scheme_map": {
370370
"email": [
371-
"oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD"
371+
"urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword"
372372
]
373373
}
374374
}
@@ -436,7 +436,7 @@ For any further customization of template here an example of what used in django
436436

437437
"authentication": {
438438
"user": {
439-
"acr": "oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD",
439+
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
440440
"class": "oidc_provider.users.UserPassDjango",
441441
"kwargs": {
442442
"verify_endpoint": "verify/oidc_user_login/",
@@ -570,8 +570,8 @@ An example::
570570
}
571571

572572
This is somethig that can be customized.
573-
For example in the django-oidc-op implementation we use something like
574-
the following (see `example/django_op/oidc_provider`)::
573+
For example in the django-oidc-op implementation is used something like
574+
the following::
575575

576576
"userinfo": {
577577
"class": "oidc_provider.users.UserInfo",

example/flask_op/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
},
8989
"authentication": {
9090
"user": {
91-
"acr": "oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD",
91+
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
9292
"class": "oidcop.user_authn.user.UserPassJinja2",
9393
"kwargs": {
9494
"verify_endpoint": "verify/user",
@@ -288,7 +288,7 @@
288288
"kwargs": {
289289
"scheme_map": {
290290
"email": [
291-
"oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD"
291+
"urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword"
292292
]
293293
}
294294
}

example/flask_op/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ op:
191191
db_file: users.json
192192
authentication:
193193
user:
194-
acr: oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD
194+
acr: urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword
195195
class: oidcop.user_authn.user.UserPassJinja2
196196
kwargs:
197197
verify_endpoint: 'verify/user'
@@ -235,7 +235,7 @@ op:
235235
kwargs:
236236
scheme_map:
237237
email:
238-
- oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD
238+
- urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword
239239

240240
# this adds PKCE support as mandatory - disable it if needed (essential: False)
241241
add_on:

src/oidcop/authn_event.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def create_authn_event(
4747
:param kwargs:
4848
:return:
4949
"""
50-
5150
args = {"uid": uid, "authn_info": authn_info}
5251

5352
if sub:

src/oidcop/configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def __init__(
384384
},
385385
"authentication": {
386386
"user": {
387-
"acr": "oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD",
387+
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
388388
"class": "oidcop.user_authn.user.UserPassJinja2",
389389
"kwargs": {
390390
"verify_endpoint": "verify/user",
@@ -515,7 +515,7 @@ def __init__(
515515
"login_hint2acrs": {
516516
"class": "oidcop.login_hint.LoginHint2Acrs",
517517
"kwargs": {
518-
"scheme_map": {"email": ["oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD"]}
518+
"scheme_map": {"email": ["urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword"]}
519519
},
520520
},
521521
"session_key": {"filename": "private/session_jwk.json", "type": "OCT", "use": "sig", },

src/oidcop/token/id_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def payload(
185185
_args.update(extra_claims)
186186

187187
# Left hashes of code and/or access_token
188-
halg = "HS%s" % alg[-3:]
188+
halg = f"HS{alg[-3:]}"
189189
if code:
190190
_args["c_hash"] = left_hash(code.encode("utf-8"), halg)
191191
if access_token:

0 commit comments

Comments
 (0)