atlassian-oauth2
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -52,3 +52,3 @@ var request = require('request'), | ||
return new RSVP.Promise(function (resolve, reject) { | ||
var jwtClaims = _createAssertionPayload(opts.hostBaseUrl, opts.oauthClientId, opts.userKey); | ||
var jwtClaims = _createAssertionPayload(opts.hostBaseUrl, opts.oauthClientId, opts.userKey, opts.authorizationServerBaseUrl); | ||
var assertion = jwt.encode(jwtClaims, opts.sharedSecret); | ||
@@ -55,0 +55,0 @@ |
{ | ||
"name": "atlassian-oauth2", | ||
"description": "Atlassian Connect OAuth2 library", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"author": "Seb Ruiz <sruiz@atlassian.com>", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -161,2 +161,10 @@ var should = require('should'), | ||
it('Request assertion is a JWT token with custom baseurl as aud', function (done) { | ||
var customAuthUrl = 'https://auth2.atlassian.io'; | ||
interceptRequest(done, function (uri, requestBody) { | ||
var body = qs.parse(requestBody); | ||
jwt.decode(body.assertion, sharedSecret).aud.should.be.eql([customAuthUrl]); | ||
}, { authorizationServerBaseUrl: customAuthUrl }); | ||
}); | ||
describe('scopes', function () { | ||
@@ -163,0 +171,0 @@ it('no scopes', function (done) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
257
82435