a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(oauth-cab): publicly export getClientAssertion

Mary 9c40d5b1 73143e33

+71 -15
+4
packages/oauth/cab/lex.config.js
··· 3 3 export default defineLexiconConfig({ 4 4 files: ['lexicons-src/**/*.ts'], 5 5 outdir: 'lib/lexicons/', 6 + export: { 7 + outdir: 'lexicons/', 8 + clean: true, 9 + }, 6 10 });
+16 -14
packages/oauth/cab/lexicons-src/dev/atcute/oauth/get-client-assertion.ts
··· 1 1 import { document, object, procedure, required, string } from '@atcute/lexicon-doc/builder'; 2 2 3 - const input = object({ 4 - properties: { 5 - aud: required(string({ description: 'authorization server issuer' })), 6 - }, 7 - }); 8 - 9 - const output = object({ 10 - properties: { 11 - client_assertion: required(string({ description: 'signed JWT assertion' })), 12 - }, 13 - }); 14 - 15 3 export default document({ 16 4 id: 'dev.atcute.oauth.getClientAssertion', 17 5 defs: { 18 6 main: procedure({ 19 7 description: 'get a DPoP-bound client assertion for OAuth token requests', 20 - input: { encoding: 'application/json', schema: input }, 21 - output: { encoding: 'application/json', schema: output }, 8 + input: { 9 + encoding: 'application/json', 10 + schema: object({ 11 + properties: { 12 + aud: required(string({ description: 'authorization server issuer' })), 13 + }, 14 + }), 15 + }, 16 + output: { 17 + encoding: 'application/json', 18 + schema: object({ 19 + properties: { 20 + client_assertion: required(string({ description: 'signed JWT assertion' })), 21 + }, 22 + }), 23 + }, 22 24 errors: [ 23 25 { name: 'InvalidDpopProof', description: 'DPoP proof is missing or invalid' }, 24 26 { name: 'UseDpopNonce', description: 'retry with the provided DPoP-Nonce' },
+46
packages/oauth/cab/lexicons/dev/atcute/oauth/getClientAssertion.json
··· 1 + { 2 + "defs": { 3 + "main": { 4 + "description": "get a DPoP-bound client assertion for OAuth token requests", 5 + "errors": [ 6 + { 7 + "name": "InvalidDpopProof", 8 + "description": "DPoP proof is missing or invalid" 9 + }, 10 + { 11 + "name": "UseDpopNonce", 12 + "description": "retry with the provided DPoP-Nonce" 13 + } 14 + ], 15 + "input": { 16 + "encoding": "application/json", 17 + "schema": { 18 + "properties": { 19 + "aud": { 20 + "type": "string", 21 + "description": "authorization server issuer" 22 + } 23 + }, 24 + "required": ["aud"], 25 + "type": "object" 26 + } 27 + }, 28 + "output": { 29 + "encoding": "application/json", 30 + "schema": { 31 + "properties": { 32 + "client_assertion": { 33 + "type": "string", 34 + "description": "signed JWT assertion" 35 + } 36 + }, 37 + "required": ["client_assertion"], 38 + "type": "object" 39 + } 40 + }, 41 + "type": "procedure" 42 + } 43 + }, 44 + "id": "dev.atcute.oauth.getClientAssertion", 45 + "lexicon": 1 46 + }
+1
packages/oauth/cab/lib/index.ts
··· 1 + export * from './lexicons/index.js';
+1
packages/oauth/cab/package.json
··· 18 18 "!lib/**/*.test.ts" 19 19 ], 20 20 "exports": { 21 + ".": "./dist/index.js", 21 22 "./client": "./dist/client/index.js", 22 23 "./server": "./dist/server/index.js" 23 24 },
+3 -1
packages/oauth/cab/tsconfig.lib.json
··· 1 1 { 2 2 "compilerOptions": { 3 + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.lib.tsbuildinfo", 4 + "rootDir": "lib/", 3 5 "outDir": "dist/", 4 6 "esModuleInterop": true, 5 7 "skipLibCheck": true, ··· 19 21 "declaration": true, 20 22 "declarationMap": true 21 23 }, 22 - "include": ["lib"], 24 + "include": ["lib/"], 23 25 "exclude": ["lib/**/*.test.ts", "lib/**/*.bench.ts"] 24 26 }