Auctoritas v0.2.3 Auctoritas.AuthenticationManager.DataStorage.Data View Source
Module to help when dealing with data creation and updates
Link to this section Summary
Types
Data struct with data and metadata maps
- data is data associated when inserting token into data_storage
- metadata contains inserted_at, updated_at and has expiration time
inserted when using
get_token_data
function from data_storage
Token expiration in seconds
Link to this section Types
Link to this type
data() View Source
Data struct with data and metadata maps
- data is data associated when inserting token into data_storage
- metadata contains inserted_at, updated_at and has expiration time
inserted when using
get_token_data
function from data_storage
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 section Functions
Link to this function
add_expiration(data, expiration)
View Source
add_expiration(data, expiration)
View Source
add_expiration(
data :: %Auctoritas.AuthenticationManager.DataStorage.Data{
data: term(),
metadata: term()
},
expiration :: expiration()
) :: %Auctoritas.AuthenticationManager.DataStorage.Data{
data: term(),
metadata: term()
}
add_expiration( data :: %Auctoritas.AuthenticationManager.DataStorage.Data{ data: term(), metadata: term() }, expiration :: expiration() ) :: %Auctoritas.AuthenticationManager.DataStorage.Data{ data: term(), metadata: term() }
Link to this function
new(data_map) View Source
Link to this function
new(data, metadata) View Source
Link to this function
update_data(data, new_data) View Source
Link to this function