mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
24 lines
643 B
JavaScript
24 lines
643 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import IdentityAdapter from './base';
|
|
|
|
export default IdentityAdapter.extend({
|
|
lookup(store, data) {
|
|
const url = `/${this.urlPrefix()}/identity/lookup/entity`;
|
|
return this.ajax(url, 'POST', { data }).then((response) => {
|
|
// unsuccessful lookup is a 204
|
|
if (!response) return;
|
|
const modelName = 'identity/entity';
|
|
store.push(
|
|
store
|
|
.serializerFor(modelName)
|
|
.normalizeResponse(store, store.modelFor(modelName), response, response.data.id, 'findRecord')
|
|
);
|
|
return response;
|
|
});
|
|
},
|
|
});
|