Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Trust and Identity Incubator
alternate-mdx
Commits
23998d8f
Commit
23998d8f
authored
Jan 21, 2022
by
Martin van Es
Browse files
WIP
parent
cd6894f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
mdserver.py
View file @
23998d8f
...
...
@@ -30,4 +30,5 @@ for domain, values in config.items():
server
.
add_watch
(
domain
,
location
)
app
.
run
(
host
=
'127.0.0.1'
,
port
=
5001
)
if
__name__
==
"__main__"
:
app
.
run
(
host
=
'127.0.0.1'
,
port
=
5001
,
debug
=
False
)
utils.py
View file @
23998d8f
...
...
@@ -49,7 +49,8 @@ class Resource:
self
.
_read_metadata
(
mdfile
)
def
_read_metadata
(
self
,
mdfile
):
print
(
"--- READ METADATA --"
)
print
(
"
\n
--- READ METADATA --"
)
print
(
mdfile
)
found
=
0
removed
=
0
old_idps
=
self
.
mdfiles
[
mdfile
].
copy
()
...
...
@@ -65,7 +66,7 @@ class Resource:
for
entity_descriptor
in
root
.
findall
(
'md:EntityDescriptor'
,
ns
):
entityID
=
entity_descriptor
.
attrib
.
get
(
'entityID'
,
'none'
)
sha1
=
hasher
(
entityID
)
print
(
f
"{{sha1}}
{
sha1
}
{
entityID
}
"
)
print
(
f
"
{{sha1}}
{
sha1
}
{
entityID
}
"
)
entity_descriptor
.
set
(
'validUntil'
,
validUntil
)
entity_descriptor
.
set
(
'cacheDuration'
,
cacheDuration
)
entity
=
Entity
()
...
...
Write
Preview
Markdown
is supported
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