feat: rename X-Hanzo-* headers to X-IAM-*
- X-Hanzo-Mode → X-IAM-Mode - X-Hanzo-Device-Id → X-IAM-Device-Id
This commit is contained in:
@@ -322,8 +322,8 @@ export class StandaloneAuthManager {
|
||||
public getHeaders(): Record<string, string> {
|
||||
if (this.isAnonymous) {
|
||||
return {
|
||||
'X-Hanzo-Mode': 'anonymous',
|
||||
'X-Hanzo-Device-Id': this.getDeviceId()
|
||||
'X-IAM-Mode': 'anonymous',
|
||||
'X-IAM-Device-Id': this.getDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export class StandaloneAuthManager {
|
||||
if (token) {
|
||||
return {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'X-Hanzo-Device-Id': this.getDeviceId()
|
||||
'X-IAM-Device-Id': this.getDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ suite('StandaloneAuthManager Test Suite', () => {
|
||||
|
||||
const headers = authManager.getHeaders();
|
||||
|
||||
assert.strictEqual(headers['X-Hanzo-Mode'], 'anonymous');
|
||||
assert.strictEqual(headers['X-Hanzo-Device-Id'], 'test-device-id');
|
||||
assert.strictEqual(headers['X-IAM-Mode'], 'anonymous');
|
||||
assert.strictEqual(headers['X-IAM-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-Hanzo-Device-Id'], 'test-device-id');
|
||||
assert.strictEqual(headers['X-IAM-Device-Id'], 'test-device-id');
|
||||
});
|
||||
|
||||
test('Should handle logout', async () => {
|
||||
|
||||
Reference in New Issue
Block a user