Skip to content
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

JWT string to NSData in Obj-C #205

Open
shadyk opened this issue Jan 22, 2019 · 3 comments
Open

JWT string to NSData in Obj-C #205

shadyk opened this issue Jan 22, 2019 · 3 comments

Comments

@shadyk
Copy link

shadyk commented Jan 22, 2019

Can we convert a JWT String (i.e. "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.TCYt5XsITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUcX16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtjPAYuNzVBAh4vGHSrQyHUdBBPM" ) to NSData format (array of bytes)?

I tried with initWithBase64EncodedString and obviously it won't work.

Is there a way?

@lolgear
Copy link
Collaborator

lolgear commented Jan 22, 2019

@shadyk
Try something like - dataUsingEncoding:

@shadyk
Copy link
Author

shadyk commented Jan 23, 2019

@lolgear

Thanks. this will transfer the string . I need the JWT object

@wanght1029
Copy link

@shadyk
I have the same problem. Can you tell me how you solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants