Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
marcus.hardt
pluto
Commits
8bc8b687
Commit
8bc8b687
authored
Nov 19, 2015
by
Marcus
Browse files
Merge branch 'master' of git.scc.kit.edu:lo0018/pluto
parents
21836809
959eff58
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/js-new.js
View file @
8bc8b687
...
@@ -44,12 +44,16 @@ $.get( from, function( assertion, stat ) {
...
@@ -44,12 +44,16 @@ $.get( from, function( assertion, stat ) {
$
.
post
(
to
,
out
,
function
(
data
,
stat
){
$
.
post
(
to
,
out
,
function
(
data
,
stat
){
console
.
log
(
'
sending
'
);
console
.
log
(
'
sending
'
);
console
.
log
(
'
buf:
'
+
buf
);
// replace content in the template
// replace content in the template
buf
=
data
.
split
(
"
url=
"
);
buf
=
data
.
split
(
"
&
"
);
url
=
buf
[
1
];
url
=
buf
[
1
].
split
(
"
=
"
)[
1
];
shorturl
=
buf
[
2
].
split
(
"
=
"
)[
1
];
console
.
log
(
'
url:
'
+
url
);
console
.
log
(
'
shorturl
'
+
shorturl
);
$
(
"
#url2
"
).
html
(
'
<a href="
'
+
url
+
'
">encrypted assertion</a>
'
);
$
(
"
#url2
"
).
html
(
'
<a href="
'
+
url
+
'
">encrypted assertion</a>
'
);
$
(
"
#url
"
).
text
(
url
+
"
?k=
"
+
key
);
$
(
"
#url
"
).
text
(
url
+
"
?k=
"
+
key
);
$
(
"
#short
_
url
"
).
text
(
short
_
url
+
"
?k=
"
+
key
);
$
(
"
#shorturl
"
).
text
(
shorturl
+
"
?k=
"
+
key
);
$
(
"
#stat_post
"
).
text
(
stat
)
$
(
"
#stat_post
"
).
text
(
stat
)
})
})
...
...
server/sso.py
View file @
8bc8b687
...
@@ -60,11 +60,14 @@ def handler(req):
...
@@ -60,11 +60,14 @@ def handler(req):
<tr> <td> Upload encrypted assertion </td><td id="stat_post"> Wait </td> </tr>
<tr> <td> Upload encrypted assertion </td><td id="stat_post"> Wait </td> </tr>
</table>
</table>
<br/><p> You can now use this URL as a temporary password:<br/>
<br/><p> You can now use this as a temporary password:<br/>
<b id="short_url"> Wait </b></p>
<b id="shorturl"> Wait </b></p>
<font size="1" color="Gray">
<p> Developer Reference:
<b id="url"> Wait </b></p><br/>
</font>
<br/><p> You can now use this URL as a temporary password:<br/>
<b id="url"> Wait </b></p>
<p> You can also download the <a id="url2" href="" > Wait for link </a> and save it to /tmp/samlup_uXXXX.encr</p>
<p> You can also download the <a id="url2" href="" > Wait for link </a> and save it to /tmp/samlup_uXXXX.encr</p>
<p> You can also download the <a href="/sd/assertion.py">unencrypted assertion</a> and save it to /tmp/samlup_uXXXX</p>
<p> You can also download the <a href="/sd/assertion.py">unencrypted assertion</a> and save it to /tmp/samlup_uXXXX</p>
<p> Replace XXXX with the UID on your client system</p>
<p> Replace XXXX with the UID on your client system</p>
...
@@ -111,14 +114,15 @@ def handler(req):
...
@@ -111,14 +114,15 @@ def handler(req):
# create hash
# create hash
assertion_hash
=
str
(
hashlib
.
md5
(
encrypted_assertion
).
hexdigest
())[
0
:
8
]
assertion_hash
=
str
(
hashlib
.
md5
(
encrypted_assertion
).
hexdigest
())[
0
:
8
]
assertion_short_url
=
'https://'
+
assertion_hash
assertion_url
=
'https://'
+
req
.
hostname
+
'/assertions/'
+
assertion_hash
assertion_url
=
'https://'
+
req
.
hostname
+
'/assertions/'
+
assertion_hash
# Publish encrypted assertion on the web
# Publish encrypted assertion on the web
write_var
(
req
,
encrypted_assertion
,
assertion_hash
)
write_var
(
req
,
encrypted_assertion
,
assertion_hash
)
# return the url as key=value FIXME
# return the url as key=value FIXME
req
.
write
(
"url=%s"
%
assertion_url
)
req
.
write
(
"
&
url=%s"
%
assertion_url
)
req
.
write
(
"short
_
url=%s"
%
'https://'
+
assertion_
ha
sh
)
req
.
write
(
"
&
shorturl=%s"
%
assertion_sh
ort_url
)
#req.write("%s" % assertion_url)
#req.write("%s" % assertion_url)
#########
#########
...
...
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