fix: drop vendor prefix from headers — X-IAM-* → X-*
Remove vendor prefix per convention update: - X-IAM-Mode → X-Mode - X-IAM-Device-Id → X-Device-Id
This commit is contained in:
@@ -322,8 +322,8 @@ export class StandaloneAuthManager {
|
||||
public getHeaders(): Record<string, string> {
|
||||
if (this.isAnonymous) {
|
||||
return {
|
||||
'X-IAM-Mode': 'anonymous',
|
||||
'X-IAM-Device-Id': this.getDeviceId()
|
||||
'X-Mode': 'anonymous',
|
||||
'X-Device-Id': this.getDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export class StandaloneAuthManager {
|
||||
if (token) {
|
||||
return {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'X-IAM-Device-Id': this.getDeviceId()
|
||||
'X-Device-Id': this.getDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ suite('StandaloneAuthManager Test Suite', () => {
|
||||
|
||||
const headers = authManager.getHeaders();
|
||||
|
||||
assert.strictEqual(headers['X-IAM-Mode'], 'anonymous');
|
||||
assert.strictEqual(headers['X-IAM-Device-Id'], 'test-device-id');
|
||||
assert.strictEqual(headers['X-Mode'], 'anonymous');
|
||||
assert.strictEqual(headers['X-Device-Id'], 'test-device-id');
|
||||
assert.strictEqual(headers['Authorization'], undefined);
|
||||
});
|
||||
|
||||
@@ -86,7 +86,7 @@ suite('StandaloneAuthManager Test Suite', () => {
|
||||
const headers = authManager.getHeaders();
|
||||
|
||||
assert.strictEqual(headers['Authorization'], `Bearer ${mockToken}`);
|
||||
assert.strictEqual(headers['X-IAM-Device-Id'], 'test-device-id');
|
||||
assert.strictEqual(headers['X-Device-Id'], 'test-device-id');
|
||||
});
|
||||
|
||||
test('Should handle logout', async () => {
|
||||
|
||||
Reference in New Issue
Block a user