Skip to content
Browse files

Edited README.md

  • Loading branch information...
1 parent ef65516 commit bfd500c27e19e9b69083c16d97754812363052a9 @slickplaid slickplaid committed Jun 27, 2011
Showing with 60 additions and 0 deletions.
  1. +60 −0 README.md
View
60 README.md
@@ -14,6 +14,7 @@ So far, `everyauth` enables you to login via:
- `yahoo`
- `readability`                             (Credits [Alfred Nerstu](https://github.com/alfrednerstu))
- `dropbox`                                    (Credits [Torgeir](https://github.com/torgeir))
+ - `vimeo`                                    (Credits [slickplaid](https://github.com/slickplaid))
- OAuth2
- `facebook`
- `github`
@@ -935,6 +936,62 @@ object whose parameter name keys map to description values:
everyauth.dropbox.configurable();
```
+## Setting up Vimeo OAuth
+
+You will first need to sign up for a [developer application](http://vimeo.com/api/applications) to get the consumer key and secret.
+
+```javascript
+var everyauth = require('everyauth')
+ , connect = require('connect');
+
+everyauth.vimeo
+ .consumerKey('YOUR CONSUMER KEY HERE')
+ .consumerSecret('YOUR CONSUMER SECRET HERE')
+ .findOrCreateUser( function (sess, accessToken, accessSecret, user) {
+ // find or create user logic goes here
+ //
+ // e.g.,
+ // return usersByVimeoId[user.id] || (usersByVimeoId[user.id] = user);
+ })
+ .redirectPath('/');
+
+var routes = function (app) {
+ // Define your routes here
+};
+
+connect(
+ connect.bodyParser()
+ , connect.cookieParser()
+ , connect.session({secret: 'whodunnit'})
+ , everyauth.middleware()
+ , connect.router(routes);
+).listen(3000);
+```
+
+You can also configure more parameters (most are set to defaults) via
+the same chainable API:
+
+```javascript
+everyauth.vimeo
+ .entryPath('/auth/vimeo')
+ .callbackPath('/auth/vimeo/callback');
+```
+
+If you want to see what the current value of a
+configured parameter is, you can do so via:
+
+```javascript
+everyauth.vimeo.callbackPath(); // '/auth/vimeo/callback'
+everyauth.vimeo.entryPath(); // '/auth/vimeo'
+```
+
+To see all parameters that are configurable, the following will return an
+object whose parameter name keys map to description values:
+
+```javascript
+everyauth.vimeo.configurable();
+```
+
## Setting up OpenID protocol
OpenID protocol allows you to use an openid auth request. You can read more information about it here http://openid.net/
@@ -1404,6 +1461,9 @@ Thanks to the following contributors for the following modules:
- Readability
- [Torgeir](https://github.com/torgeir)
- DropBox
+- [slickplaid](https://github.com/slickplaid)
+ - Justin.tv
+ - Vimeo
### MIT License
Copyright (c) 2011 by Brian Noguchi

0 comments on commit bfd500c

Please sign in to comment.
Something went wrong with that request. Please try again.