Skip to content

Instantly share code, notes, and snippets.

@yuchi
Last active August 29, 2015 14:18
Show Gist options
  • Save yuchi/7f352721b096b1d2687e to your computer and use it in GitHub Desktop.
Save yuchi/7f352721b096b1d2687e to your computer and use it in GitHub Desktop.
Liferay Connector Snippet #1 (callback authentication)
liferay.authenticate(
// The Portal URL
'http://localhost:8080',
// The authentication parameters
{
login: 'test@liferay.com',
password: 'test'
},
// The callback
function (err, session) {
if (err) console.log("Oh gosh an error!");
else console.log("Yay! I got a session!");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment