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
61524e4f
Commit
61524e4f
authored
Jul 10, 2020
by
Jonathan Schaeffer
Browse files
Revert "Removing endyear of a network mapping."
This reverts commit
2c2065e6
.
parent
2c2065e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
61524e4f
...
...
@@ -92,7 +92,7 @@ What does this program do ?
4.
Register this in the resifAuth database, along with the
`expires_at`
value (24h)
5.
From the
`member-of`
field in the token :
-
do the mapping from EPOS names to FDSN reference from the epos_fdsn table in the resifAuth database
the FDSN reference is the network name, startyear
the FDSN reference is the network name, startyear
, endyear
-
register the login along with the FDSN references and the expiration date in the resifInv-Prod database, table
`access`
6.
Return the
`login:password`
to the client
...
...
eidawsauth/configurations/default.py
View file @
61524e4f
...
...
@@ -26,5 +26,5 @@ class default():
PRIVILEGEDBPASSWORD
=
_dbpassword
EPOS_FDSN_MAP
=
{
'/epos/alparray'
:
{
'networkcode'
:
'Z3'
,
'startyear'
:
2015
},
'/epos/alparray'
:
{
'networkcode'
:
'Z3'
,
'startyear'
:
2015
,
'endyear'
:
2020
},
}
eidawsauth/eidawsauth.py
View file @
61524e4f
...
...
@@ -133,7 +133,7 @@ def register_privileges(login, fdsn_refs):
ref
[
'networkid'
]
=
cur
.
fetchone
()[
0
]
logging
.
info
(
"Inserting tupple in %s.eida_temp_users: %s"
,
application
.
config
[
'PRIVILEGEDBNAME'
],
ref
)
cur
.
execute
(
"""
insert into eida_temp_users (network_id, network, start_year, name, expires_at) values (%(networkid)s, %(networkcode)s, %(startyear)s, %(login)s, %(expires_at)s);
insert into eida_temp_users (network_id, network, start_year,
end_year,
name, expires_at) values (%(networkid)s, %(networkcode)s, %(startyear)s,
%(endyear)s,
%(login)s, %(expires_at)s);
"""
,
ref
)
except
psycopg2
.
Error
as
e
:
logging
.
error
(
e
.
pgerror
)
...
...
eidawsauth/version.py
View file @
61524e4f
__version__
=
'0.4.
2
'
__version__
=
'0.4.
0
'
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