@emulators/microsoft 0.4.0 → 0.4.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/README.md +48 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @emulators/microsoft
|
|
2
|
+
|
|
3
|
+
Microsoft Entra ID (Azure AD) v2.0 OAuth 2.0 and OpenID Connect emulation with authorization code flow, PKCE, client credentials, RS256 ID tokens, and OIDC discovery.
|
|
4
|
+
|
|
5
|
+
Part of [emulate](https://github.com/vercel-labs/emulate) — local drop-in replacement services for CI and no-network sandboxes.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @emulators/microsoft
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Endpoints
|
|
14
|
+
|
|
15
|
+
- `GET /.well-known/openid-configuration` — OIDC discovery document
|
|
16
|
+
- `GET /:tenant/v2.0/.well-known/openid-configuration` — tenant-scoped OIDC discovery
|
|
17
|
+
- `GET /discovery/v2.0/keys` — JSON Web Key Set (JWKS)
|
|
18
|
+
- `GET /oauth2/v2.0/authorize` — authorization endpoint (shows user picker)
|
|
19
|
+
- `POST /oauth2/v2.0/token` — token exchange (authorization code, refresh token, client credentials)
|
|
20
|
+
- `GET /oidc/userinfo` — OpenID Connect user info
|
|
21
|
+
- `GET /v1.0/me` — Microsoft Graph user profile
|
|
22
|
+
- `GET /v1.0/users/:id` — Microsoft Graph user by ID
|
|
23
|
+
- `GET /oauth2/v2.0/logout` — end session / logout
|
|
24
|
+
- `POST /oauth2/v2.0/revoke` — token revocation
|
|
25
|
+
|
|
26
|
+
## Auth
|
|
27
|
+
|
|
28
|
+
OIDC authorization code flow with PKCE support. Also supports client credentials grants. Microsoft Graph `/v1.0/me` available.
|
|
29
|
+
|
|
30
|
+
## Seed Configuration
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
microsoft:
|
|
34
|
+
users:
|
|
35
|
+
- email: testuser@outlook.com
|
|
36
|
+
name: Test User
|
|
37
|
+
oauth_clients:
|
|
38
|
+
- client_id: example-client-id
|
|
39
|
+
client_secret: example-client-secret
|
|
40
|
+
name: My Microsoft App
|
|
41
|
+
redirect_uris:
|
|
42
|
+
- http://localhost:3000/api/auth/callback/microsoft-entra-id
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Links
|
|
46
|
+
|
|
47
|
+
- [Full documentation](https://emulate.dev/microsoft)
|
|
48
|
+
- [GitHub](https://github.com/vercel-labs/emulate)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emulators/microsoft",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"hono": "^4",
|
|
31
31
|
"jose": "^6",
|
|
32
|
-
"@emulators/core": "0.4.
|
|
32
|
+
"@emulators/core": "0.4.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"tsup": "^8",
|