Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Connectivity Check
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Connectivity Check
Commits
4aa043fd
Commit
4aa043fd
authored
3 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error on API
parent
dbfa7b1d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api.py
+3
-4
3 additions, 4 deletions
api.py
with
3 additions
and
4 deletions
api.py
+
3
−
4
View file @
4aa043fd
...
@@ -5,10 +5,9 @@ import logging
...
@@ -5,10 +5,9 @@ import logging
import
re
import
re
import
eccs_properties
as
e_p
import
eccs_properties
as
e_p
#from eccs_properties import DAY, ECCS_LOGSDIR, ECCS_OUTPUTDIR, ECCS_LISTFEDSURL, ECCS_LISTFEDSFILE, ECCS_RESULTSLOG
from
flask
import
Flask
,
request
,
jsonify
from
flask
import
Flask
,
request
,
jsonify
from
flask_restful
import
Resource
,
Api
from
flask_restful
import
Resource
,
Api
from
utils
import
get_logger
,
get_list_f
eds
,
get_list_eccs_idps
,
get_reg_auth_dict
,
generate_login_url
from
utils
import
get_logger
,
get_list_f
rom_url
,
get_reg_auth_dict
,
generate_login_url
from
markupsafe
import
escape
from
markupsafe
import
escape
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
...
@@ -204,7 +203,7 @@ class EccsResults(Resource):
...
@@ -204,7 +203,7 @@ class EccsResults(Resource):
# /api/fedstats
# /api/fedstats
class
FedStats
(
Resource
):
class
FedStats
(
Resource
):
def
get
(
self
):
def
get
(
self
):
list_feds
=
get_list_f
eds
(
e_p
.
ECCS_LISTFEDSURL
,
e_p
.
ECCS_LISTFEDSFILE
)
list_feds
=
get_list_f
rom_url
(
e_p
.
ECCS_LISTFEDSURL
,
e_p
.
ECCS_LISTFEDSFILE
)
regAuthDict
=
get_reg_auth_dict
(
list_feds
)
regAuthDict
=
get_reg_auth_dict
(
list_feds
)
file_path
=
f
"
{
e_p
.
ECCS_OUTPUTDIR
}
/
{
e_p
.
ECCS_RESULTSLOG
}
"
file_path
=
f
"
{
e_p
.
ECCS_OUTPUTDIR
}
/
{
e_p
.
ECCS_RESULTSLOG
}
"
...
@@ -283,7 +282,7 @@ class Help(Resource):
...
@@ -283,7 +282,7 @@ class Help(Resource):
@app.route
(
'
/getsamlreq
'
)
@app.route
(
'
/getsamlreq
'
)
def
getSamlReq
():
def
getSamlReq
():
# Setup list_eccs_idps
# Setup list_eccs_idps
list_eccs_idps
=
get_list_
eccs_idps
(
e_p
.
ECCS_LISTIDPSURL
,
e_p
.
ECCS_LISTIDPSFILE
)
list_eccs_idps
=
get_list_
from_url
(
e_p
.
ECCS_LISTIDPSURL
,
e_p
.
ECCS_LISTIDPSFILE
)
entityid_idp
=
request
.
args
.
get
(
'
idp
'
)
entityid_idp
=
request
.
args
.
get
(
'
idp
'
)
entityid_sp
=
request
.
args
.
get
(
'
sp
'
)
entityid_sp
=
request
.
args
.
get
(
'
sp
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment