@webex/plugin-authorization-browser-first-party 3.12.0-webex-services-ready.4 → 3.13.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +426 -0
- package/.sdd/manifest.json +395 -0
- package/AGENTS.md +214 -0
- package/README.md +70 -7
- package/dist/authorization.js +82 -17
- package/dist/authorization.js.map +1 -1
- package/dist/config.js +42 -13
- package/dist/config.js.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/docs/adr/0001-retain-product-readme.md +102 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +301 -0
- package/docs/getting-started.md +98 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +69 -0
- package/package.json +13 -13
- package/schemas/repo-context.schema.json +796 -0
- package/src/authorization.js +78 -15
- package/src/config.js +28 -8
- package/src/docs/README.md +657 -0
- package/src/index.js +1 -1
- package/test/unit/spec/authorization.js +288 -16
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Getting Started
|
|
3
|
+
title: Getting started
|
|
4
|
+
description: Local setup, build, run, and test routing for @webex/plugin-authorization-browser-first-party.
|
|
5
|
+
tags: [onboarding]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: getting-started@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-03T06:25:15Z
|
|
13
|
+
validation_status: pass
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Getting started
|
|
17
|
+
|
|
18
|
+
Onboarding for **@webex/plugin-authorization-browser-first-party**, a package inside the
|
|
19
|
+
`webex-js-sdk` Yarn workspace. Run every command from the workspace root.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
| Tool or access | Version or requirement |
|
|
24
|
+
| -------------- | ---------------------- |
|
|
25
|
+
| Node.js | `>=8` per this package's `engines`; the workspace `.nvmrc` selects `lts/jod` and the root `AGENTS.md` asks for 22.14 |
|
|
26
|
+
| Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
|
|
27
|
+
| Registry or account access | N/A for building and unit tests; the skipped automation suite needs test users and a redirect URI |
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The workspace `deploy.yml` workflow installs with the same command.
|
|
36
|
+
|
|
37
|
+
## Build
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
yarn workspace @webex/plugin-authorization-browser-first-party build
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`build` runs `build:src`, which writes `dist/` through `webex-legacy-tools`. `dist/` is ignored by Git.
|
|
44
|
+
|
|
45
|
+
## Run
|
|
46
|
+
|
|
47
|
+
N/A — this is a browser library with no start script. Import
|
|
48
|
+
`@webex/plugin-authorization-browser-first-party` before any other authorization plugin and create a
|
|
49
|
+
webex instance; the plugin is then `webex.authorization`.
|
|
50
|
+
|
|
51
|
+
## Tests
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
yarn workspace @webex/plugin-authorization-browser-first-party build:src
|
|
55
|
+
yarn workspace @webex/plugin-authorization-browser-first-party test:unit
|
|
56
|
+
yarn workspace @webex/plugin-authorization-browser-first-party test:style
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
| Tier | Command | Test location | Framework | External dependencies |
|
|
60
|
+
| ---- | ------- | ------------- | --------- | --------------------- |
|
|
61
|
+
| Unit | `yarn workspace @webex/plugin-authorization-browser-first-party test:unit` | `test/unit/spec` | jest runner through `webex-legacy-tools`, with chai, sinon, and `@webex/test-helper-mock-webex` | A current `dist/` (the spec imports the package by name) |
|
|
62
|
+
| Browser | None runnable: `test:browser` collects `test/integration/spec`, which does not exist | — | karma through `webex-legacy-tools` | — |
|
|
63
|
+
| Automation | None runnable from the package: `test/automation/spec/authorization-code-grant.js` is `describe.skip` | `test/automation/spec` | mocha-style spec with `@webex/test-helper-automation` | Live Webex services, test users, `WEBEX_REDIRECT_URI` |
|
|
64
|
+
|
|
65
|
+
- Coverage or quality gate: none; the legacy Jest configuration sets `collectCoverage: false`
|
|
66
|
+
- Enforcement source: N/A
|
|
67
|
+
- Test environment or QA dependencies: none for unit tests
|
|
68
|
+
|
|
69
|
+
Do not run `yarn workspace @webex/plugin-authorization-browser-first-party test`: it chains the
|
|
70
|
+
undefined `test:integration` script.
|
|
71
|
+
|
|
72
|
+
## Configuration and secrets
|
|
73
|
+
|
|
74
|
+
- Required configuration: `credentials.client_id`, `redirect_uri`, and `scope`; `client_secret` only
|
|
75
|
+
with `clientType: 'confidential'` or for the device flow; `clientType` defaults to `public` in
|
|
76
|
+
`src/config.js`
|
|
77
|
+
- Secret source: N/A for unit tests, which use fake values
|
|
78
|
+
- Package or artifact access: N/A
|
|
79
|
+
- Required neighboring packages: `@webex/webex-core` and `@webex/common` resolve through the workspace
|
|
80
|
+
- Platform, simulator, device, or SDK setup: a browser window (`location`, `history`, `sessionStorage`,
|
|
81
|
+
`crypto`); unit tests supply a mock window
|
|
82
|
+
- Never commit credentials or copy production secrets into a local config.
|
|
83
|
+
|
|
84
|
+
## First-run verification
|
|
85
|
+
|
|
86
|
+
1. Run `yarn workspace @webex/plugin-authorization-browser-first-party build:src`.
|
|
87
|
+
2. Run `yarn workspace @webex/plugin-authorization-browser-first-party test:unit` and check that the
|
|
88
|
+
`plugin-authorization-browser-first-party` suite lists the `#initialize()`, `#initiateLogin()`,
|
|
89
|
+
`#handleThirdPartyCallback()`, and `#initQRCodeLogin()` cases.
|
|
90
|
+
3. Run `yarn workspace @webex/plugin-authorization-browser-first-party test:style`.
|
|
91
|
+
|
|
92
|
+
Expected result: all three commands exit zero.
|
|
93
|
+
|
|
94
|
+
## Next steps
|
|
95
|
+
|
|
96
|
+
- [Package architecture](architecture.md)
|
|
97
|
+
- [Specification registry](specs/README.md)
|
|
98
|
+
- [Documentation index](index.md)
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
okf_version: '0.1'
|
|
3
|
+
---
|
|
4
|
+
<!-- sdd-generated-metadata
|
|
5
|
+
doc_kind: standing-doc
|
|
6
|
+
generated_from: docs-index@0.3.0
|
|
7
|
+
generated_by: claude-code
|
|
8
|
+
approved_by: rarajes2@cisco.com
|
|
9
|
+
updated_at: 2026-11-03T06:25:15Z
|
|
10
|
+
validation_status: pass
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
# @webex/plugin-authorization-browser-first-party documentation
|
|
14
|
+
|
|
15
|
+
Doc map for developers and agents working on the first-party browser authorization plugin.
|
|
16
|
+
|
|
17
|
+
## Start here
|
|
18
|
+
|
|
19
|
+
- [Getting started](getting-started.md)
|
|
20
|
+
- [Package architecture](architecture.md)
|
|
21
|
+
|
|
22
|
+
## Decisions
|
|
23
|
+
|
|
24
|
+
- [adr/](adr/index.md) — architectural decision records
|
|
25
|
+
|
|
26
|
+
## Specifications and contracts
|
|
27
|
+
|
|
28
|
+
- [architecture.md](architecture.md) — canonical package architecture and contract index
|
|
29
|
+
- [specs/README.md](specs/README.md) — manifest-backed module and contract registry
|
|
30
|
+
- [`src/docs/README.md`](../src/docs/README.md) — the first-party browser authorization plugin
|
|
31
|
+
specification beside its code
|
|
32
|
+
- [adr/](adr/index.md) — concrete architectural decisions; blank ADR templates remain under the
|
|
33
|
+
monorepo root `.sdd/`
|
|
34
|
+
|
|
35
|
+
This package is a library, so there is no service specification and no OpenAPI document. Exact
|
|
36
|
+
contract details live in the native sources linked from the architecture index: `package.json` and
|
|
37
|
+
`src/index.js` for the package, and `src/authorization.js` for the plugin API and events.
|
|
38
|
+
|
|
39
|
+
## Related repository resources
|
|
40
|
+
|
|
41
|
+
- [`README.md`](../README.md) — retained npm usage page; see [ADR-0001](adr/0001-retain-product-readme.md)
|
|
42
|
+
- [`AGENTS.md`](../AGENTS.md) — agent instructions for this package
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Specification registry
|
|
4
|
+
description: Canonical specification registry and change-routing guide.
|
|
5
|
+
tags: [specifications, registry]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: spec-index@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-03T06:25:15Z
|
|
13
|
+
validation_status: pass
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Specification registry
|
|
17
|
+
|
|
18
|
+
Use this page to find the canonical package architecture and every instantiated module specification
|
|
19
|
+
plus native contract. Keep technical facts in one owning document and use this page only for
|
|
20
|
+
navigation, ownership, status, and change/test routing.
|
|
21
|
+
|
|
22
|
+
Start with the [package architecture](../architecture.md). No service specification exists because this
|
|
23
|
+
package is a library.
|
|
24
|
+
|
|
25
|
+
## Document roles
|
|
26
|
+
|
|
27
|
+
| Document | Canonical ownership |
|
|
28
|
+
| -------- | ------------------- |
|
|
29
|
+
| [Package architecture](../architecture.md) | Package boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
|
|
30
|
+
| Module specifications | Stable behavior and design at each manifest-routed `<module-path>/docs/README.md` |
|
|
31
|
+
| [ADR](../adr/index.md) | A durable decision, its deciders, rationale, consequences, and supersession lineage |
|
|
32
|
+
|
|
33
|
+
## Instantiated specification registry
|
|
34
|
+
|
|
35
|
+
| Resource | Role | Canonical path | Owner | Status | Last verified |
|
|
36
|
+
| -------- | ---- | -------------- | ----- | ------ | ------------- |
|
|
37
|
+
| Package | Architecture | `docs/architecture.md` | @webex/web-client | Draft | 2026-11-03 |
|
|
38
|
+
| First-party browser authorization plugin | Module | `src/docs/README.md` | @webex/web-client | Draft | 2026-11-03 |
|
|
39
|
+
| Retain the product README | ADR | `docs/adr/0001-retain-product-readme.md` | @webex/web-client | Accepted | 2026-11-03 |
|
|
40
|
+
|
|
41
|
+
### Module registry
|
|
42
|
+
|
|
43
|
+
| Module | Responsibility | Manifest coverage state | Start here |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| `src/` | `webex.authorization` for the Webex web client: code login with PKCE and CSRF, startup completion, token exchange and refresh callback, third-party callback, QR device login, and logout redirect | Partial | `src/docs/README.md` |
|
|
46
|
+
|
|
47
|
+
Generator-side field measurement for the module is complete (93.3%, assessed 2026-11-03). Independent
|
|
48
|
+
semantic validation by runtime Codex Desktop, session `01a1a00a-3708-7d11-9bad-6309010d8dfb`, passed on
|
|
49
|
+
2026-11-03 with no findings. Drift recording, a characterization baseline, and promotion past Partial
|
|
50
|
+
remain pending.
|
|
51
|
+
|
|
52
|
+
## Change and verification routing
|
|
53
|
+
|
|
54
|
+
| Change affects | Load and update | Verification route |
|
|
55
|
+
| -------------- | --------------- | ------------------ |
|
|
56
|
+
| Package boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `yarn workspace @webex/plugin-authorization-browser-first-party test:unit` after `build:src`, and the module spec |
|
|
57
|
+
| A stable code, package, or component boundary | `src/docs/README.md` | Module tests plus affected contracts |
|
|
58
|
+
| A public API, event, or package contract | The owning architecture section, `src/docs/README.md`, and the native definition in `src/authorization.js`, `src/config.js`, or `package.json` | Unit tests; check the `webex` first-party entry and the Webex web client login, QR, and logout flows |
|
|
59
|
+
|
|
60
|
+
## Module and contract registration
|
|
61
|
+
|
|
62
|
+
The module specification is generated at the exact `modules[].canonical_spec` path recorded in
|
|
63
|
+
`.sdd/manifest.json`. Register every module and submodule in the Module registry above in manifest tree
|
|
64
|
+
order.
|
|
65
|
+
|
|
66
|
+
Contracts are registered in `.sdd/manifest.json` `contract_catalog` and indexed in
|
|
67
|
+
[`docs/architecture.md`](../architecture.md#public-and-consumer-surfaces) with a stable ID, publication
|
|
68
|
+
state, native source, and owning module. This page provides navigation and ownership rather than a copied
|
|
69
|
+
contract.
|
package/package.json
CHANGED
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
27
27
|
"@webex/jest-config-legacy": "0.0.0",
|
|
28
28
|
"@webex/legacy-tools": "0.0.0",
|
|
29
|
-
"@webex/test-helper-chai": "3.12.0-
|
|
30
|
-
"@webex/test-helper-mocha": "3.12.0-
|
|
31
|
-
"@webex/test-helper-mock-webex": "3.12.0-
|
|
32
|
-
"@webex/test-helper-test-users": "3.12.0-
|
|
29
|
+
"@webex/test-helper-chai": "3.12.0-next.13",
|
|
30
|
+
"@webex/test-helper-mocha": "3.12.0-next.13",
|
|
31
|
+
"@webex/test-helper-mock-webex": "3.12.0-next.13",
|
|
32
|
+
"@webex/test-helper-test-users": "3.12.0-next.13",
|
|
33
33
|
"eslint": "^8.24.0",
|
|
34
34
|
"prettier": "^2.7.1",
|
|
35
35
|
"sinon": "^9.2.4"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webex/common": "3.12.0-
|
|
39
|
-
"@webex/storage-adapter-local-storage": "3.
|
|
40
|
-
"@webex/test-helper-automation": "3.12.0-
|
|
41
|
-
"@webex/test-helper-chai": "3.12.0-
|
|
42
|
-
"@webex/test-helper-mocha": "3.12.0-
|
|
43
|
-
"@webex/test-helper-mock-webex": "3.12.0-
|
|
44
|
-
"@webex/test-helper-test-users": "3.12.0-
|
|
45
|
-
"@webex/webex-core": "3.
|
|
38
|
+
"@webex/common": "3.12.0-next.13",
|
|
39
|
+
"@webex/storage-adapter-local-storage": "3.13.0-next.1",
|
|
40
|
+
"@webex/test-helper-automation": "3.12.0-next.13",
|
|
41
|
+
"@webex/test-helper-chai": "3.12.0-next.13",
|
|
42
|
+
"@webex/test-helper-mocha": "3.12.0-next.13",
|
|
43
|
+
"@webex/test-helper-mock-webex": "3.12.0-next.13",
|
|
44
|
+
"@webex/test-helper-test-users": "3.12.0-next.13",
|
|
45
|
+
"@webex/webex-core": "3.13.0-next.1",
|
|
46
46
|
"crypto-js": "^4.1.1",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"uuid": "^3.3.2"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"test:style": "eslint ./src/**/*.*",
|
|
57
57
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
58
58
|
},
|
|
59
|
-
"version": "3.
|
|
59
|
+
"version": "3.13.0-next.1"
|
|
60
60
|
}
|