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

Adds a new One time token type. #421

Closed
wants to merge 3 commits into from
Closed

Adds a new One time token type. #421

wants to merge 3 commits into from

Commits on Nov 13, 2017

  1. Adds a new One time token type.

    This token type is _not_ a JWT and is useful for when you need one time access.
    
    The one time token uses Ecto to keep track of it's contents if it has been used or not.
    
    If a token has already been used it will be as though that token never existed and will not verify.
    
    From the tests:
    
    ```elixir
    {:ok, claims} = Impl.decode_and_verify(ctx.token)
    assert claims["claims"] == ctx.claims["claims"]
    
    assert Impl.resource_from_claims(claims) == {:ok, %{id: ctx.id}}
    
    assert Impl.decode_and_verify(ctx.token) == {:error, :token_not_found_or_expired}
    ```
    
    See `Guardian.Token.OneTime` for more information
    hassox committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    ef3ca68 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2017

  1. handle build errors

    hassox committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    3a80d03 View commit details
    Browse the repository at this point in the history
  2. Drop support for elixir 1.3

    hassox committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    74f4ec7 View commit details
    Browse the repository at this point in the history