Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
ws-eidaauth
Commits
9b026a85
Commit
9b026a85
authored
Jun 14, 2021
by
Jonathan Schaeffer
Browse files
Invert givenName and shortName in database
parent
48c8f19c
Changes
1
Hide whitespace changes
Inline
Side-by-side
eidawsauth/eidawsauth.py
View file @
9b026a85
...
...
@@ -62,6 +62,8 @@ def register_privileges(login, tokendict):
application
.
logger
.
debug
(
" ... is in epos fdsn map"
)
fdsn_memberships
.
append
(
application
.
config
[
'EPOS_FDSN_MAP'
][
em
])
# Now get localy defined autorizations, from email adress
if
len
(
fdsn_memberships
)
==
0
:
return
...
...
@@ -138,7 +140,7 @@ def get_login_password(tokendict):
expiration_time
=
datetime
.
datetime
.
now
()
+
datetime
.
timedelta
(
days
=
1
)
# Register login in authentication database
cur
.
execute
(
"""
INSERT INTO users VALUES (DEFAULT, %(login)s, %(givenName)s,
%(sn)s,
%(mail)s, %(expires_at)s);
INSERT INTO users VALUES (DEFAULT, %(login)s,
%s(sn)s,
%(givenName)s, %(mail)s, %(expires_at)s);
"""
,
{
'login'
:
login
,
'givenName'
:
tokendict
[
'givenName'
],
'sn'
:
tokendict
[
'sn'
],
'mail'
:
tokendict
[
'mail'
],
'expires_at'
:
expiration_time
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment