-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix guardian 0.14 compatibility #34
Conversation
@imranismail is it possible to have two different PRs. One for 0.14 compatibility, another for ecto version update. E.g. i'm using mongodb, and ecto driver is not ready for 2.1 version, so that way i can still use guardian_db with 0.14 version fix and shouldn't wait till mongodb_ecto driver have 2.1 version support? |
@AlexKovalevych sure, I'll separate them |
Okay, rewrote the history, good to go. Also someone already has a PR for Ecto update, so I'm skipping that |
@imranismail the ecto update has been merged in, could you please resolve the conflicts? |
@doomspork resolved! |
@@ -53,8 +53,14 @@ defmodule GuardianDb do | |||
Create a new new token based on the JWT and decoded claims | |||
""" | |||
def create!(claims, jwt) do | |||
prepared_claims = claims |> Dict.put("jwt", jwt) |> Dict.put("claims", claims) | |||
GuardianDb.repo.insert cast(%Token{}, prepared_claims, [:jti, :typ, :aud, :iss, :sub, :exp, :jwt, :claims]) | |||
prepared_claims = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for formatting this 💜
Thanks again @imranismail 😀 |
* Remove part of #34 since the original issue has been fixed in guardian * code cleaning * Also accepts binary values for sweep_interval. May be useful when configuring application with environment variables
No description provided.