Make OIDC_IDTOKEN_SUB_GENERATOR to be lazy imported by the location of the function.

This commit is contained in:
juanifioren 2016-01-12 15:17:22 -03:00
parent 497123d37f
commit ccd9836edb
6 changed files with 51 additions and 18 deletions

View file

@ -21,7 +21,7 @@ def create_id_token(user, aud, nonce):
Return a dic.
"""
sub = settings.get('OIDC_IDTOKEN_SUB_GENERATOR')(user=user)
sub = settings.get('OIDC_IDTOKEN_SUB_GENERATOR', import_str=True)(user=user)
expires_in = settings.get('OIDC_IDTOKEN_EXPIRE')