This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
authentic2-beid/src/authentic2_beid/backends.py

10 lines
275 B
Python

from authentic2.auth2_auth.auth2_ssl.backends import SSLBackend
from authentic2.auth2_auth.auth2_ssl import util
class BeIDBackend(SSLBackend):
def build_username(ssl_info):
dn = dict(util.explode_dn(ssl_info.subject_dn))
return dn.get('serialNumber')