Auctoritas v0.9.1 Auctoritas.DataStorage.Data View Source
Link to this section Summary
Types
Token expiration in seconds
When was token inserted (UNIX Epoch time)
Data struct with data and metadata maps
- data is data associated when inserting token into data_storage
- metadata contains inserted_at, updated_at, expires_in time
inserted when using
get_token_data
function from data_storage
Refresh token
When was token updated (UNIX Epoch time)
Link to this section Types
Link to this type
expiration()
View Source
expiration()
View Source
expiration() :: non_neg_integer()
expiration() :: non_neg_integer()
Token expiration in seconds
Link to this type
inserted_at()
View Source
inserted_at()
View Source
inserted_at() :: non_neg_integer()
inserted_at() :: non_neg_integer()
When was token inserted (UNIX Epoch time)
Link to this type
metadata()
View Source
metadata()
View Source
metadata() :: %{
inserted_at: inserted_at(),
updated_at: updated_at(),
expires_in: expiration()
}
metadata() :: %{ inserted_at: inserted_at(), updated_at: updated_at(), expires_in: expiration() }
Data struct with data and metadata maps
- data is data associated when inserting token into data_storage
- metadata contains inserted_at, updated_at, expires_in time
inserted when using
get_token_data
function from data_storage
Link to this type
token()
View Source
token()
View Source
token() :: String.t()
token() :: String.t()
Refresh token
Link to this type
updated_at()
View Source
updated_at()
View Source
updated_at() :: non_neg_integer()
updated_at() :: non_neg_integer()
When was token updated (UNIX Epoch time)
Link to this section Functions
Link to this function
add_expiration(data, expiration) View Source
Link to this function
decode(data_json) View Source
Link to this function
encode(data) View Source
Link to this function
get_data(data) View Source
Link to this function
get_metadata(data) View Source
Link to this function
get_refresh_token(data) View Source
Link to this function
initial_metadata(expiration)
View Source
initial_metadata(expiration)
View Source
initial_metadata(expiration :: expiration()) :: metadata()
initial_metadata(expiration :: expiration()) :: metadata()
Link to this function
new(data_map) View Source
Link to this function
new(data, expiration)
View Source
new(data, expiration)
View Source
new(data :: map(), expiration :: expiration()) :: %Auctoritas.DataStorage.Data{
data: term(),
metadata: term(),
refresh_token: term()
}
new(data :: map(), expiration :: expiration()) :: %Auctoritas.DataStorage.Data{ data: term(), metadata: term(), refresh_token: term() }
Link to this function
new(data, refresh_token, expiration) View Source
Link to this function
update_data(data, new_data) View Source
Link to this function