Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
42a13378
Commit
42a13378
authored
Aug 13, 2014
by
Jonathon Duerig
Browse files
Add a placeholder tool token and some debugging output for authentication
parent
ad5e8d9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/aptui/js/geni-login.js
View file @
42a13378
...
...
@@ -15,15 +15,39 @@ function (_, sup, loginString)
$
(
'
#authorize
'
).
click
(
function
(
event
)
{
event
.
preventDefault
();
genilib
.
authorize
(
window
.
ID
,
window
.
CERT
,
complete
);
genilib
.
authorize
({
id
:
window
.
ID
,
toolCertificate
:
window
.
CERT
,
complete
:
complete
,
authenticate
:
authenticate
});
return
false
;
});
}
function
complete
(
credential
)
function
authenticate
(
userCertificate
,
success
,
failure
)
{
// Some AJAX call that ends with success or failure based on the result
// success should be called with the PKCS#7 string
success
(
'
-----BEGIN PKCS7-----
\n
'
+
'
MIIByQYJKoZIhvcNAQcDoIIBujCCAbYCAQAxggFcMIIBWAIBADCBwDCBuDELMAkG
\n
'
+
'
A1UEBhMCVVMxDTALBgNVBAgTBFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5
\n
'
+
'
MR0wGwYDVQQKExRVdGFoIE5ldHdvcmsgVGVzdGJlZDEeMBwGA1UECxMVQ2VydGlm
\n
'
+
'
aWNhdGUgQXV0aG9yaXR5MRgwFgYDVQQDEw9ib3NzLmVtdWxhYi5uZXQxKDAmBgkq
\n
'
+
'
hkiG9w0BCQEWGXRlc3RiZWQtb3BzQGZsdXgudXRhaC5lZHUCAwEv7TANBgkqhkiG
\n
'
+
'
9w0BAQEFAASBgDaDHASj7fN7Dp3dvp/Gm2pgfeIf6W+bhanzmgb/21PqU4wQDjDD
\n
'
+
'
IWsdmGigRKsvn4D/a2kbI27s3QrSf8bsZXeKRsDNm0wWvtdhPQuiiFHYwXjYmE7j
\n
'
+
'
Zi6OEWLxCoVfNL/fdjNppAqGKn2rg6vPVArBGYk+JpAB8QwWJjA2mQIeMFEGCSqG
\n
'
+
'
SIb3DQEHATAaBggqhkiG9w0DAjAOAgIAoAQI5C991yqoRxiAKAfhoqHKJjQTAp3A
\n
'
+
'
W5P/6+wNAa5TLBMbDlEyN3L3FolO4LKqJ5tbnKo=
\n
'
+
'
-----END PKCS7-----
\n
'
);
}
function
complete
(
credential
,
authenticationToken
,
encryptedCredential
)
{
$
(
'
#credential
'
).
show
();
$
(
'
#credential
'
).
val
(
credential
);
console
.
log
(
authenticationToken
,
encryptedCredential
);
}
$
(
document
).
ready
(
initialize
);
});
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