diff --git a/dist/corbel.js b/dist/corbel.js index aa0abbd..0ef0b13 100644 --- a/dist/corbel.js +++ b/dist/corbel.js @@ -1828,7 +1828,7 @@ }; Iam.GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:jwt-bearer'; - Iam.AUD = 'http://iam.bqws.io'; + Iam.AUD = 'http://iam.corbel.io'; Iam.IAM_TOKEN = 'iamToken'; Iam.IAM_TOKEN_SCOPES = 'iamScopes'; diff --git a/dist/corbel.with-polyfills.js b/dist/corbel.with-polyfills.js index c94809e..689c766 100644 --- a/dist/corbel.with-polyfills.js +++ b/dist/corbel.with-polyfills.js @@ -2826,7 +2826,7 @@ }; Iam.GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:jwt-bearer'; - Iam.AUD = 'http://iam.bqws.io'; + Iam.AUD = 'http://iam.corbel.io'; Iam.IAM_TOKEN = 'iamToken'; Iam.IAM_TOKEN_SCOPES = 'iamScopes'; diff --git a/src/iam/iam.js b/src/iam/iam.js index b9236fa..e6549dd 100644 --- a/src/iam/iam.js +++ b/src/iam/iam.js @@ -23,7 +23,7 @@ }; Iam.GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:jwt-bearer'; - Iam.AUD = 'http://iam.bqws.io'; + Iam.AUD = 'http://iam.corbel.io'; Iam.IAM_TOKEN = 'iamToken'; Iam.IAM_TOKEN_SCOPES = 'iamScopes'; diff --git a/test/node/unit/jwt.js b/test/node/unit/jwt.js index b3db216..9614c1d 100644 --- a/test/node/unit/jwt.js +++ b/test/node/unit/jwt.js @@ -23,12 +23,12 @@ describe('JWT module', function() { var secret = 'secret', claims = { 'iss': CLIENT_ID, - 'aud': 'http://iam.bqws.io', + 'aud': 'http://iam.corbel.io', 'exp': 1391535, 'scope': SCOPES, 'version': '1.0.0' }; - var EXPECTED_ASSERTION = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDTElFTlRfSUQiLCJhdWQiOiJodHRwOi8vaWFtLmJxd3MuaW8iLCJleHAiOjEzOTE1MzUsInNjb3BlIjoic2NvcGUxIHNjb3BlMiIsInZlcnNpb24iOiIxLjAuMCJ9._TCKYb3gbsuznfwA1gopY4mSYr7VHmvFQGxW1CJJjHQ'; + var EXPECTED_ASSERTION = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDTElFTlRfSUQiLCJhdWQiOiJodHRwOi8vaWFtLmNvcmJlbC5pbyIsImV4cCI6MTM5MTUzNSwic2NvcGUiOiJzY29wZTEgc2NvcGUyIiwidmVyc2lvbiI6IjEuMC4wIn0.Lkr2LKGv-qyPX6wW30rIB7xHU2svwIYeCx22aegtrJE'; // without alg var assertion = corbel.jwt.generate(claims, secret); @@ -48,12 +48,12 @@ describe('JWT module', function() { var secret = 'secret', claims = { iss: 'clientId', - aud: 'http://iam.bqws.io', + aud: 'http://iam.corbel.io', exp: 12345, scope: 'scope:example1 scope:example2' }; - var EXPECTED = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjbGllbnRJZCIsImF1ZCI6Imh0dHA6Ly9pYW0uYnF3cy5pbyIsImV4cCI6MTIzNDUsInNjb3BlIjoic2NvcGU6ZXhhbXBsZTEgc2NvcGU6ZXhhbXBsZTIifQ.18g9YO_KgWtW1s7HSo87mIjG02u8Pe880tdLbg_JxC4'; + var EXPECTED = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjbGllbnRJZCIsImF1ZCI6Imh0dHA6Ly9pYW0uY29yYmVsLmlvIiwiZXhwIjoxMjM0NSwic2NvcGUiOiJzY29wZTpleGFtcGxlMSBzY29wZTpleGFtcGxlMiJ9.I8wVQbmqoX5LlXHrRzbp5mzaUMBqu6zLhhAvyyNJI6g'; var assertion = corbel.jwt.generate(claims, secret); expect(assertion).to.be.equal(EXPECTED); @@ -68,7 +68,7 @@ describe('JWT module', function() { expect(jwtDecoded.alg).to.be.equal('HS256'); expect(jwtDecoded.iss).to.be.equal('clientId'); - expect(jwtDecoded.aud).to.be.equal('http://iam.bqws.io'); + expect(jwtDecoded.aud).to.be.equal('http://iam.corbel.io'); expect(jwtDecoded.exp).to.be.equal(12345); expect(jwtDecoded.scope).to.be.equal('scope:example1 scope:example2'); });