this repo has no description
2
fork

Configure Feed

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

updated readme

+30 -1
+30 -1
README.md
··· 11 11 - **Modern Swift Concurrency** - Built with Swift 6.2 using async/await and actors for thread-safe operations 12 12 - **Global Actor Isolation** - Uses `@APActor` for consistent thread safety across all AT Protocol operations 13 13 - **Flexible Network Routing** - Generic `NetworkRouter` that works with any endpoint conforming to `EndpointType` 14 + - **ATProto OAuth** - First-party OAuth client with DPoP, PAR, issuer validation, and identity resolution (handle or DID) 14 15 - **Automatic Token Management** - Built-in support for JWT access/refresh token handling with automatic retry on expiration 15 16 - **Multiple Parameter Encodings** - URL, JSON, and combined encoding strategies for request parameters 16 17 - **AT Protocol Error Handling** - Typed error responses matching AT Protocol error specifications ··· 19 20 ## Requirements 20 21 21 22 - Swift 6.2+ 22 - - iOS 26.0+ / macOS 26.0+ / watchOS 26.0+ / tvOS 26.0+ / Mac Catalyst 26.0+ 23 + - iOS 17.0+ / macOS 14.0+ / watchOS 11.0+ / tvOS 17.0+ / Mac Catalyst 17.0+ 23 24 24 25 ## Installation 25 26 ··· 68 69 69 70 // Change host 70 71 await update(hostURL: "https://different-pds.example") 72 + ``` 73 + 74 + ### OAuth Authentication 75 + 76 + Use `ATProtoOAuth` for OAuth login flows: 77 + 78 + ```swift 79 + import CoreATProtocol 80 + 81 + let oauth = await ATProtoOAuth( 82 + config: .init( 83 + clientMetadataURL: "https://example.com/client-metadata.json", 84 + redirectURI: "com.example.app:/oauth/callback" 85 + ), 86 + storage: .init( 87 + retrieveLogin: { nil }, 88 + storeLogin: { _ in }, 89 + retrievePrivateKey: { nil }, 90 + storePrivateKey: { _ in } 91 + ) 92 + ) 93 + 94 + let result = try await oauth.authenticate(identifier: "alice.bsky.social") { authURL, _ in 95 + // Present authURL to the user and return callback URL. 96 + fatalError("Implement user-auth callback handling") 97 + } 98 + 99 + await setup(hostURL: result.pdsEndpoint, accessJWT: result.accessToken, refreshJWT: result.refreshToken) 71 100 ``` 72 101 73 102 ### Defining Endpoints