|
let jwt = try JWT<ClaimType>(jwtString: jwtString, verifier: jwtVerifier) |
According to the JWT documentation, if the constructor fails, it could also be that the signature was wrong.
Decode a JWT from a JWT string
A JWT struct can be initialized from a JWT string. If a JWTVerifier is provided it will be used to verify the signature before initialization
Whereas the validateClaims function only validates the claims on the JWT (e.g. nbf or exp) and does nothing regarding the signature:
|
guard validationResult == .success else { |
dp3t-sdk-ios/Sources/DP3TSDK/utils/JWTVerification.swift
Line 64 in f0f4939
According to the JWT documentation, if the constructor fails, it could also be that the signature was wrong.
Whereas the
validateClaimsfunction only validates the claims on the JWT (e.g. nbf or exp) and does nothing regarding the signature:dp3t-sdk-ios/Sources/DP3TSDK/utils/JWTVerification.swift
Line 66 in f0f4939