From 20e958b1eecc3ac974cca069b186ebb4bf1ddd70 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 6 May 2017 21:32:51 -0400 Subject: [PATCH] new identity server uri for auth --- settings.Preview.json | 3 ++- settings.Production.json | 7 ++++--- settings.json | 3 ++- src/app/config.js | 2 +- src/app/services/apiService.js | 7 ++++--- src/app/settings.js | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/settings.Preview.json b/settings.Preview.json index 1983b1e97c..aadd101e55 100644 --- a/settings.Preview.json +++ b/settings.Preview.json @@ -1,5 +1,6 @@ { "appSettings": { - "apiUri": "https://preview-api.bitwarden.com" + "apiUri": "https://preview-api.bitwarden.com", + "identityUri": "https://preview-identity.bitwarden.com" } } diff --git a/settings.Production.json b/settings.Production.json index 3be6a9c81d..a497d29e87 100644 --- a/settings.Production.json +++ b/settings.Production.json @@ -1,5 +1,6 @@ { - "appSettings": { - "apiUri": "https://api.bitwarden.com" - } + "appSettings": { + "apiUri": "https://api.bitwarden.com", + "identityUri": "https://identity.bitwarden.com" + } } diff --git a/settings.json b/settings.json index bc9ea4838d..be17e03895 100644 --- a/settings.json +++ b/settings.json @@ -1,5 +1,6 @@ { "appSettings": { - "apiUri": "http://localhost:4000" + "apiUri": "http://localhost:4000", + "identityUri": "http://localhost:33656" } } diff --git a/src/app/config.js b/src/app/config.js index 6b5895cf09..820eeb03a8 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -6,7 +6,7 @@ angular $qProvider.errorOnUnhandledRejections(false); $locationProvider.hashPrefix(''); jwtOptionsProvider.config({ - urlParam: 'access_token2', + urlParam: 'access_token3', whiteListedDomains: ['api.bitwarden.com', 'preview-api.bitwarden.com', 'localhost', '192.168.1.8'] }); var refreshPromise; diff --git a/src/app/services/apiService.js b/src/app/services/apiService.js index 23539a3b72..eec79d095a 100644 --- a/src/app/services/apiService.js +++ b/src/app/services/apiService.js @@ -3,7 +3,8 @@ .factory('apiService', function ($resource, tokenService, appSettings, $httpParamSerializer) { var _service = {}, - _apiUri = appSettings.apiUri; + _apiUri = appSettings.apiUri, + _identityUri = appSettings.identityUri; _service.logins = $resource(_apiUri + '/logins/:id', {}, { get: { method: 'GET', params: { id: '@id' } }, @@ -108,9 +109,9 @@ getPublicKey: { url: _apiUri + '/users/:id/public-key', method: 'GET', params: { id: '@id' } } }); - _service.identity = $resource(_apiUri + '/connect', {}, { + _service.identity = $resource(_identityUri + '/connect', {}, { token: { - url: _apiUri + '/connect/token', + url: _identityUri + '/connect/token', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' }, transformRequest: transformUrlEncoded, diff --git a/src/app/settings.js b/src/app/settings.js index 6599bf5f89..246304cb0e 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"apiUri":"https://api.bitwarden.com","version":"1.10.0","environment":"Production"}); +.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","version":"1.10.0","environment":"Production"});