Returns the authentication string from HTTP headers for use by applets
Get parameters
- pageName = Any page name (required but not used)
Get examples:
// Simple URL
/OpenForum/Actions/GetAuthentication?pageName=dummy
// Using JSON.get
JSON.get('/OpenForum/Actions/GetAuthentication', null, 'pageName=dummy')
.onSuccess(function(authString) {
console.log('Authentication:', authString);
}).go();
Get Action
Server Side Javascript for GET method
//OpenForum/Actions/GetAuthentication/get.sjs
if(typeof(pageName)=="undefined")
{
transaction.setResult(transaction.SHOW_PAGE);
}
else
{
authentication = transaction.getHttpHeader().getElementByName("authorization");
if(authentication==null)
{
authentication = "";
}
else
{
authentication = authentication.getValue();
}
transaction.sendPage( authentication );
}