mount public data from the atmosphere to a virtual filesystem (macos only) pdfs.at
0
fork

Configure Feed

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

feat(oauth): publish client-metadata.json + cross-check with Swift default

+29
+17
Packages/ATProto/Tests/ATProtoTests/OAuth/MetadataResolverTests.swift
··· 63 63 #expect((dict["dpop_bound_access_tokens"] as? Bool) == true) 64 64 #expect((dict["application_type"] as? String) == "native") 65 65 } 66 + 67 + @Test("hosted client-metadata.json matches ClientMetadata.defaultPDFS") 68 + func hostedMatchesSwift() throws { 69 + // Path is relative to the test file's on-disk location at compile time. 70 + // Tests/ATProtoTests/OAuth/ → repo root → oauth/client-metadata.json 71 + let url = URL(fileURLWithPath: #filePath) 72 + .deletingLastPathComponent() // OAuth/ 73 + .deletingLastPathComponent() // ATProtoTests/ 74 + .deletingLastPathComponent() // Tests/ 75 + .deletingLastPathComponent() // ATProto/ 76 + .deletingLastPathComponent() // Packages/ 77 + .deletingLastPathComponent() // atfs/ (repo root) 78 + .appendingPathComponent("oauth/client-metadata.json") 79 + let data = try Data(contentsOf: url) 80 + let hosted = try JSONDecoder().decode(ClientMetadata.self, from: data) 81 + #expect(hosted == ClientMetadata.defaultPDFS) 82 + } 66 83 }
+12
oauth/client-metadata.json
··· 1 + { 2 + "client_id": "https://pdfs.at/oauth/client-metadata.json", 3 + "client_name": "pdfs", 4 + "client_uri": "https://pdfs.at", 5 + "redirect_uris": ["pdfs://oauth/callback"], 6 + "grant_types": ["authorization_code", "refresh_token"], 7 + "response_types": ["code"], 8 + "scope": "atproto repo:* blob:*/*", 9 + "token_endpoint_auth_method": "none", 10 + "dpop_bound_access_tokens": true, 11 + "application_type": "native" 12 + }