Add Autodesk Platform Services (APS) OAuth emulator - #201
Open
mrestrepoj10 wants to merge 3 commits into
Open
Conversation
Stateful emulation of the APS OAuth v2 API at its real paths: authorize with PKCE (S256), token for all three grant types, revoke, introspect, JWKS, logout, userinfo, and OIDC discovery. Access tokens are RS256 JWTs with the documented claims; refresh tokens are single use and rotate, with grant-family invalidation on replay, matching production APS. Includes seed config, zero-config defaults, 54 tests, package README, agent skill, web docs page, and registry/docs listings (also restores Twilio in the docs navigation lists it was missing from). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Rg8ZpxU5NAYMUCCpgamFq
Contributor
|
@mrestrepoj10 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
…lient The zero-config confidential client already covered the Auth.js callback path; Better Auth's genericOAuth plugin uses /api/auth/oauth2/callback/:id, so both mainstream auth libraries now work against the emulator without a seed file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Rg8ZpxU5NAYMUCCpgamFq
Keeps the generated starter config and every seed example consistent with the sample client's registered redirect URIs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Rg8ZpxU5NAYMUCCpgamFq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@emulators/aps, a stateful emulator for the Autodesk Platform Services OAuth v2 API (the authentication layer for Autodesk Construction Cloud, BIM 360, Fusion, and every other APS product). This is the first AEC (architecture, engineering, construction) service in emulate; the plan is to follow with the APS data APIs (Data Management, Model Derivative) based on interest, and a Procore emulator after that.What it emulates
All endpoints at their real
developer.api.autodesk.compaths:GET /authentication/v2/authorizewith the shared sign-in UI, PKCE (S256 only, required for public clients), and spec-accurate error redirectsPOST /authentication/v2/tokenforauthorization_code,client_credentials, andrefresh_tokenPOST /authentication/v2/revoke,POST /authentication/v2/introspectGET /authentication/v2/keys(JWKS),GET /authentication/v2/logoutGET /userinfo(real APS serves this fromapi.userprofile.autodesk.com; mapped onto the emulator base URL)GET /.well-known/openid-configurationAccess tokens are RS256 JWTs carrying the documented claims (
scopeas array,client_id, real APSiss/aud,useridon 3-legged) and verify against the JWKS endpoint. Lifetimes follow the docs: codes 5 minutes single-use, access tokensexpires_in: 3599, refresh tokens 15 days.Fidelity note: single-use refresh tokens
APS rotates refresh tokens on every use and invalidates the previous one; replaying a consumed token kills the grant. This is the number-one production failure mode for APS integrations (two serverless instances refreshing concurrently brick the user's connection), and it is faithfully emulated including grant-family invalidation on replay, so integration tests can exercise the failure locally instead of discovering it in production.
Implementation
developerMessage,errorCode,"more info").@emulators/oktafor structure,josefor signing, the shared UI system from@emulators/corefor the sign-in and error pages, seedable and resettable stores.aps-test-client/aps-test-secret, public clientaps-test-app, usertestuser@autodesk.local) sonpx emulate --service apsworks immediately.skills/aps, and the web docs pages and navigation.Not included (yet)
APS data APIs (Data Management hubs/projects, Model Derivative) and rate-limit emulation. Kept out to keep this PR reviewable; happy to follow up based on interest.