mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-29 04:34:30 +01:00
initialize ppolicy module
This commit is contained in:
parent
ac7661731c
commit
c302198e6e
@ -115,6 +115,16 @@ ldap.dn_user_attr = 'uid'
|
|||||||
#ad.auth = 'Administrator'
|
#ad.auth = 'Administrator'
|
||||||
#ad.password = 'password'
|
#ad.password = 'password'
|
||||||
|
|
||||||
|
[ppolicy]
|
||||||
|
|
||||||
|
# password policy module
|
||||||
|
ppolicy.module = 'ldapcherry.ppolicy.simple'
|
||||||
|
|
||||||
|
# parameters of the module
|
||||||
|
min_length = 8
|
||||||
|
min_upper = 1
|
||||||
|
min_digit = 1
|
||||||
|
|
||||||
# authentification parameters
|
# authentification parameters
|
||||||
[auth]
|
[auth]
|
||||||
|
|
||||||
|
17
ldapcherry/ppolicy/__init.py
Normal file
17
ldapcherry/ppolicy/__init.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:set expandtab tabstop=4 shiftwidth=4:
|
||||||
|
#
|
||||||
|
# The MIT License (MIT)
|
||||||
|
# LdapCherry
|
||||||
|
# Copyright (c) 2014 Carpentier Pierre-Francois
|
||||||
|
|
||||||
|
class Ppolicy:
|
||||||
|
|
||||||
|
def __init__(self, config, logger):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def check(self, password):
|
||||||
|
ret = {'match': True, 'reason': 'no password policy'}
|
||||||
|
|
||||||
|
def info(self):
|
||||||
|
ret = "There is no password policy configured"
|
7
ldapcherry/ppolicy/simple.py
Normal file
7
ldapcherry/ppolicy/simple.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:set expandtab tabstop=4 shiftwidth=4:
|
||||||
|
#
|
||||||
|
# The MIT License (MIT)
|
||||||
|
# LdapCherry
|
||||||
|
# Copyright (c) 2014 Carpentier Pierre-Francois
|
||||||
|
|
Loading…
Reference in New Issue
Block a user