Permalink
Browse files

Updated readme

  • Loading branch information...
1 parent a7a9aed commit 5d978ee4f680411c9e3c58aa23f98596298ac379 @robrighter committed Jan 14, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
View
15 README.md
@@ -38,6 +38,21 @@ Usage
server.use(server.router);
});
+**Easily check on any route if a user has been authenticated**
+
+ server.get('/my-account', function(req,res){
+ req.authenticate(['oauth'], function(error, authenticated) {
+ if( authenticated ){
+ //This user is logged in
+ //render out a page for the logged in user
+ }
+ else{
+ //This user is not logged in
+ //render out a login page
+ }
+ });
+ });
+
(3) Usage on the Client Side
**Include JQuery and the EasyOAuth Client Lib**

0 comments on commit 5d978ee

Please sign in to comment.