diff --git a/src/common/lib/client/auth.ts b/src/common/lib/client/auth.ts index d0b6bd164..8362ce059 100644 --- a/src/common/lib/client/auth.ts +++ b/src/common/lib/client/auth.ts @@ -995,6 +995,11 @@ class Auth { this._userSetClientId(authOptions.clientId); } + /* AO2: authMethod defaults to GET and is stored on the options object */ + if (!('authMethod' in authOptions)) { + authOptions.authMethod = 'GET'; + } + this.authOptions = authOptions; } } diff --git a/test/uts/deviations.md b/test/uts/deviations.md index a8d39d32c..095ed001b 100644 --- a/test/uts/deviations.md +++ b/test/uts/deviations.md @@ -110,18 +110,6 @@ These tests assert spec behavior but are skipped by default because they are kno --- -### options_types: AO2 - authMethod default not stored - -**Spec (AO2)**: `authMethod` should default to `'GET'` and be stored in auth options. - -**ably-js behavior**: Default `authMethod` is not stored. - -**Test**: `AO2 - authMethod defaults to GET`. - -**Issue**: [#2205](https://github.com/ably/ably-js/issues/2205) - ---- - ### channels: RTL4c - errorReason not cleared on successful re-attach **Spec (RTL4c, proposed)**: When a confirmation ATTACHED is received, the channel's errorReason should be set to null. diff --git a/test/uts/rest/unit/types/options_types.test.ts b/test/uts/rest/unit/types/options_types.test.ts index 44ca0ad80..e3178d148 100644 --- a/test/uts/rest/unit/types/options_types.test.ts +++ b/test/uts/rest/unit/types/options_types.test.ts @@ -166,8 +166,6 @@ describe('uts/rest/unit/types/options_types', function () { */ // UTS: rest/unit/AO2/auth-options-attributes-0.1 it('AO2 - authMethod defaults to GET', function () { - // DEVIATION: see deviations.md - if (!process.env.RUN_DEVIATIONS) this.skip(); installMockHttp(simpleMock()); const client = new Ably.Rest({ authUrl: 'https://auth.example.com/token',