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

Commit 5c6d678

Browse files
committed
chore: Documentation about login_hint2acr and html templates
1 parent c95a7b3 commit 5c6d678

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

doc/source/contents/conf.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ This can be useful during the first time the project have been executed, then to
358358
login_hint2acrs
359359
---------------
360360

361+
OIDC Login hint support, it's optional.
362+
It matches the login_hint paramenter to one or more Authentication Contexts.
363+
361364
An example::
362365

363366
"login_hint2acrs": {
@@ -371,6 +374,17 @@ An example::
371374
}
372375
},
373376

377+
oidc-op supports the following authn contexts:
378+
379+
- UNSPECIFIED, urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified
380+
- INTERNETPROTOCOLPASSWORD, urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword
381+
- MOBILETWOFACTORCONTRACT, urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract
382+
- PASSWORDPROTECTEDTRANSPORT, urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
383+
- PASSWORD, urn:oasis:names:tc:SAML:2.0:ac:classes:Password
384+
- TLSCLIENT, urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient
385+
- TIMESYNCTOKEN, urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken
386+
387+
374388
-----
375389
authz
376390
-----
@@ -409,10 +423,33 @@ An example::
409423
template_dir
410424
------------
411425

426+
The HTML Template directory used by Jinja2, used by endpoint context
427+
template loader, as::
428+
429+
Environment(loader=FileSystemLoader(template_dir), autoescape=True)
430+
412431
An example::
413432

414433
"template_dir": "templates"
415434

435+
For any further customization of template here an example of what used in django-oidc-op
436+
437+
"authentication": {
438+
"user": {
439+
"acr": "oidcop.user_authn.authn_context.INTERNETPROTOCOLPASSWORD",
440+
"class": "oidc_provider.users.UserPassDjango",
441+
"kwargs": {
442+
"verify_endpoint": "verify/oidc_user_login/",
443+
"template": "oidc_login.html",
444+
445+
"page_header": "Testing log in",
446+
"submit_btn": "Get me in!",
447+
"user_label": "Nickname",
448+
"passwd_label": "Secret sauce"
449+
}
450+
}
451+
},
452+
416453
------------------
417454
token_handler_args
418455
------------------

src/oidcop/login_hint.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def __call__(self, arg):
2121

2222

2323
class LoginHint2Acrs(object):
24+
"""
25+
OIDC Login hint support
26+
"""
2427
def __init__(self, scheme_map, server_get=None):
2528
self.scheme_map = scheme_map
2629
self.server_get = server_get

0 commit comments

Comments
 (0)