mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
WIP convert web vault to new identity server
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
angular
|
||||
.module('bit.services')
|
||||
|
||||
.factory('apiService', function ($resource, tokenService, appSettings) {
|
||||
.factory('apiService', function ($resource, tokenService, appSettings, $httpParamSerializer) {
|
||||
var _service = {},
|
||||
_apiUri = appSettings.apiUri;
|
||||
|
||||
@@ -57,5 +57,19 @@
|
||||
tokenTwoFactor: { url: _apiUri + '/auth/token/two-factor', method: 'POST', params: {} }
|
||||
});
|
||||
|
||||
_service.identity = $resource(_apiUri + '/connect', {}, {
|
||||
token: {
|
||||
url: _apiUri + '/connect/token',
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
|
||||
transformRequest: transformUrlEncoded,
|
||||
params: {}
|
||||
}
|
||||
});
|
||||
|
||||
function transformUrlEncoded(data) {
|
||||
return $httpParamSerializer(data);
|
||||
}
|
||||
|
||||
return _service;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user