GenieFramework / GenieAuthentication.jl

Authentication plugin for Genie framework
MIT License
20 stars 11 forks source link

Add information about current_user() in README.md #12

Closed dmolina closed 2 years ago

dmolina commented 2 years ago

Write about the existence of current_user() in README to inform readers how to obtain current user information.

I have to read the source code searching a function to get the current user. I think it should be indicated in the README.

AbhimanyuAryan commented 2 years ago

Looks good thanks for the contribution @dmolina 👍🏼

dmolina commented 2 years ago

Sorry, but I realised later that, although you can use current_user() in the templates, it is not working as function available in the module, because it is in files/plugins/genie_authentication.jl, not in src/GenieAuthentication.jl. Could be moved to a function in the module to be able to use it directly as the example?

essenciary commented 2 years ago

That is not needed. All the files in plugins/ are loaded by default into the app - they are meant to run in the app's space, that is how plugins are designed.