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
export riak_core_security:get_context, maybe make it not crash for unknown users? [JIRA: RIAK-2229] #707
Comments
as an aside, if get_context is called with an nonexistent user it crashes with badarg, here is a diff that avoids the crash but maybe the returned value doesn't make sense:
using it before:
using if after with an unknown user:
|
fix here: marianoguerra@3cb0f09 |
I saw your note @marianoguerra. I'll ask @seemaj to get this into our Jira and see when we can merge. Thank you! FYI @Basho-JIRA |
@angrycub one dropping through the cracks here. |
I have a riak_core app that used Json Web Token [1], that means the user authenticates, I give it a token and then he does a new request with that token, then I have to get the context from riak_core_security to check permissions, for this I need to export get_context to call it with the username in the token since neither I nor the user holds the password to authenticate again.
is there another way to get the context other than exporting this function?
otherwise I'm willing to provide a patch/pull request to export this function (it's a one liner)
[1] http://jwt.io/
The text was updated successfully, but these errors were encountered: