-
Notifications
You must be signed in to change notification settings - Fork 19
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
Guardian V1 Support #49
Comments
@hassox Thanks for sending this my way. Very excited about the pipeline change. In a branch I'm working on accomplishing the same kind of functionality so seeing this is awesome. The timing also works out well, as my lockable module was going to implement some breaking changes, so this will work nicely into the next version.
Just a lack of knowledge on my part, but can you give examples of that? Everything else looks very straight forward, so I'll take a look at the docs and let you know if I have any other questions. |
Hey @britton-jb The new version allows multiple modules to be configured. As part of that, each module specifies a The most immediate use case of this functionality I think is to allow support for specific producers (like Auth0) although a full token module wouldn't be needed for that. Only a change to the verifier and a specific secret lookup. We've tried to keep it as backward compatible as possible but still push though cleanup of various apis and the overall structure of the lib. If you want hit me up on Slack and I'll try and answer any questions you have mate :) |
Sounds great. Thanks for all of the hard work on Guardian. |
Hi
I've been working on getting a release together for Guardian v1. This release is
significantly different (in a good way!).
The big difference in V1 is the use of an implementation module, allowing for
multiple configurations per project.
Guardian V1 allows for:
To get started with V1 developers need to create a 'token module'.
Once you have your implementation module (a bare bones one is above) you can use that directly:
Or, for library authors such as yourself
We've also disambiguated setting token type, ttl and the key from the claims. These are now set via the options.
Secrets and configuration values also got an overhaul. Any value can be of the form:
{:system, "KEY"}
{mod, :func}
{mod, :func, [args]}
fn -> some_value end
These configuration options can be set either in the configuration or in the implementation module as options to
use Guardian
Pipelines
All plugs require being set as part of a pipeline. Pipelines put the implementation module and error handler on the conn.
You can set these directly with
Guardian.Pipeline
or create a pipeline moduleOR
With usage
I expect that this will be a pre-release within about a week.
I'd love to get feedback on it before it goes full version 1.
The text was updated successfully, but these errors were encountered: