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

Can I get data from encoded token string with secret key like other jwt implement? #91

Closed
nicozhang opened this issue May 31, 2016 · 5 comments
Assignees

Comments

@nicozhang
Copy link

I am trying to use jwt in PHP,but they are all hard to use.Your implemtent seems much easier.I have used python jwt, it is very easy to use and I can get data with secret key.But I can not find the method in your implment.Did I miss something import?Wish for your help?

@lcobucci lcobucci self-assigned this May 31, 2016
@lcobucci
Copy link
Owner

@nicozhang what you mean with "get data with secret key"? Give us some more information so we can help you 😉

@nicozhang
Copy link
Author

The code below from psecio/jwt:

issuer('http://example.org') ->audience('http://example.com') ->issuedAt(1356999524) ->notBefore(1357000000) ->expireTime(time()+3600) ->jwtId('id123456') ->type('https://example.com/register'); $result = $jwt->encrypt('AES-256-CBC', '1234567812345678', $encryptKey); echo 'ENCRYPTED: '.var_export($result, true)."\n"; echo "DECRYPTED: ".var_export($jwt->decrypt($result, 'AES-256-CBC', '1234567812345678', $encryptKey), true)."\n"; ?>

the header and other data are encrypted with an encryptKey, it also can decrypt with the key. Your implement can do this ?

@lcobucci
Copy link
Owner

We don't have nested and encrypted tokens implemented yet 😞, but it's planned for next major release.

@nicozhang
Copy link
Author

Awesome,may I be the member of your team? I also can add other features to your repo.Your implement is much more grace than others.

@lcobucci
Copy link
Owner

lcobucci commented May 31, 2016

Contributors are usually invited based on their contributions to the project, but you don't need to be a contributor to collaborate you can just fork the repo and send PRs with improvements 😄

Will close this as duplicate of #6.

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

No branches or pull requests

2 participants