Skip to content

Commit

Permalink
Merge pull request #9 from siacomuzzi/master
Browse files Browse the repository at this point in the history
Minor Enhancements
  • Loading branch information
jaredhanson committed Apr 5, 2018
2 parents b9a1b00 + d3a0b45 commit 5b989dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
@@ -1,3 +1,5 @@
> Fix for Yammer's new authentication method ([issue #3](https://github.com/jaredhanson/passport-yammer/issues/3)), which needs the auth token specified in an Authorization: Bearer <xxx> header. Credits to [oscarrenalias](https://github.com/oscarrenalias).
# Passport-Yammer

[Passport](https://github.com/jaredhanson/passport) strategy for authenticating
Expand Down
5 changes: 5 additions & 0 deletions lib/passport-yammer/strategy.js
Expand Up @@ -50,6 +50,11 @@ function Strategy(options, verify) {
this.name = 'yammer';
this._userProfileURL = options.userProfileURL || 'https://www.yammer.com/api/v1/users/current.json';

// Fix for Yammer's new authentication method, which needs the auth token specified
// in an Authorization: Bearer <xxx> header. Luckily Passport's OAuth2 client has support for
// this built-in so it's only a matter of enabling it
this._oauth2.useAuthorizationHeaderforGET(true);

// Despite claiming to support the OAuth 2.0 specification, Yammer's
// implementation does anything but. Yammer's token endpoint returns a
// response that is so non-conformant that we are forced to resort to
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "passport-yammer",
"version": "0.1.2",
"version": "0.1.3",
"description": "Yammer authentication strategy for Passport.",
"keywords": ["passport", "yammer", "auth", "authn", "authentication", "identity"],
"repository": {
Expand All @@ -22,7 +22,7 @@
"main": "./lib/passport-yammer",
"dependencies": {
"pkginfo": "0.2.x",
"passport-oauth": "0.1.x"
"passport-oauth": "1.x.x"
},
"devDependencies": {
"vows": "0.6.x"
Expand Down

0 comments on commit 5b989dc

Please sign in to comment.