• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-swift / 18316862621

07 Oct 2025 02:56PM UTC coverage: 77.283% (-0.8%) from 78.043%
18316862621

Pull #812

github

web-flow
Merge 46111f580 into a2320ec64
Pull Request #812: feat(auth): introduce getClaims method to verify and extract JWT claims

193 of 331 new or added lines in 7 files covered. (58.31%)

5872 of 7598 relevant lines covered (77.28%)

24.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Sources/Auth/Internal/JWTAlgorithm.swift
1
//
2
//  JWTVerifier.swift
3
//  Supabase
4
//
5
//  Created by Claude on 06/10/25.
6
//
7

8
import Foundation
9

10
enum JWTAlgorithm: String {
11
  case rs256 = "RS256"
12

13
  func verify(
14
    jwt: DecodedJWT,
15
    jwk: JWK
NEW
16
  ) -> Bool {
×
NEW
17
    let message = "\(jwt.raw.header).\(jwt.raw.payload)".data(using: .utf8)!
×
NEW
18
    switch self {
×
NEW
19
    case .rs256:
×
20
      #if canImport(Security)
NEW
21
        return SecKeyVerifySignature(
×
NEW
22
          jwk.rsaPublishKey!,
×
NEW
23
          .rsaSignatureMessagePKCS1v15SHA256,
×
NEW
24
          message as CFData,
×
NEW
25
          jwt.signature as CFData,
×
NEW
26
          nil
×
NEW
27
        )
×
28
      #else
29
        return false
30
      #endif
NEW
31
    }
×
NEW
32
  }
×
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc