WSSE for JavaScript
The current default authentication method in TypePad and Movable Type's Atom implementation is WSSE. WSSE is a header containing a token based on username, password and date and looks like:
X-WSSE: UsernameToken Username="name", PasswordDigest="digest", Created="timestamp", Nonce="nonce"
I have implented a library in JavaScript to generate this header, quite useful for XmlHttpRequest and GM_XmlHttpRequest functions. An example of use:
<html>
<head>
<script language="JavaScript1.2" src="wsse.js">
</head>
<body>
<script language="JavaScript1.2">
var w = wsseHeader(Username, Password);
alert('X-WSSE: ' + w);
</script>
</body>
This library uses code from Paul Johnston, JF Walker and aardwulf systems.
強いです
Posted by: shilei | July 29, 2005 at 07:35 AM
I hava a problem and want to ask you .Can you help me ?
The problem is :
where does the user's information save? for example ,user's name,password. is it Cookie,session or any other ?
Posted by: shilei | August 03, 2005 at 04:04 AM
I hava a problem and want to ask you .Can you help me ?
The problem is :
where does the user's information save? for example ,user's name,password. is it Cookie,session or any other ?
Posted by: shi | August 03, 2005 at 04:14 AM
Hi,
I would like to use your script, but it doesn't say what license the complete thing is released under.. could you add that to the script?
Posted by: Morten W. Petersen | August 25, 2005 at 12:25 AM
shilei: You just call the function in JavaScript passing the parameters.
Morten: Right, I forgot to specify a license. I release my code under BSD, but please take care of other ones' licenses.
Posted by: Víctor R. Ruiz | August 25, 2005 at 03:31 PM
Great, thanks for releasing this bit under the BSD. I was looking to create exactly what you created with the same base libraries, and stumbled upon this by chance (googling for wsse). :)
Posted by: Morten W. Petersen | August 25, 2005 at 11:34 PM
Has anyone done a quick web-based form to generate WSSE authentication strings for testing?
Posted by: Eric Jacksch | June 14, 2007 at 07:28 PM
The wsse.js has a problem on the timezone calculation in isodatetime(). It is necessary to add or subtract 24 to the variable hour, if Date.getDate() is different from Date.getUTCDate().
Posted by: P | September 12, 2007 at 02:18 AM