-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Raw ClaimSet Data #69
Comments
I also need this, or the best possible way to convert to an |
How can we use this in Objective-C any Idea. I have used cocoapods file for Swift, but calling JWT file in Objective-C not working. |
@kashiftriffort You need to wrap the methods you need in a bridge file. However, this issue is specifically surrounding the fact that the code was changed recently and it's now throwing a warning that a certain method that helped enable this is deprecated.
|
I don't think we need a bridge file for this, after Cocopods installed, I can directly called #import "JWT-Swift.h", into Objective-C file and option for bridging header is not provided in Objective-C target. If you give me any support that will be great help for me. |
I also need the data, as I have an API which returns a JWT body for certain responses, which I would like to feed to |
I don’t know what the status of this is but I still believe it is overly abstracted. |
As described in issue kylef#69 in some cases access to the raw json data is needed. Therefore „claims“ should be exposed.
I 've created a pull request that makes "claims" accessible for reading. If you need a "fast solution" you can use my forked version |
@Wooder |
I'm using
let payload: Payload = try JWT.decode(...)
to get the dictionary data to pass off to a 3rd party library. I'm getting a deprecated notice so I trylet claimSet: ClaimSet = JWT.decode(...); claimSet.claims
but get the error'claims' is inaccessible due to 'internal' protection level
.EDIT: Forgot to mention I'm using Carthage.
The text was updated successfully, but these errors were encountered: