Created
March 23, 2019 11:05
-
-
Save zoltanarvai/883ae1f9f5f435e0391557135e11bb72 to your computer and use it in GitHub Desktop.
Struct to encompass token and other meta info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Auth.TokenResult do | |
@moduledoc """ | |
This struct represents the result of the authentication sign-in process. | |
We get a JWT access token from Auth0 and an expires_in field explaining | |
how long the token field will be available | |
""" | |
@enforce_keys [:access_token, :expires_in] | |
defstruct access_token: "", expires_in: 0 | |
@type t :: %__MODULE__{ | |
access_token: String.t(), | |
expires_in: String.t() | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment