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() :: %Auctoritas.AuthenticationManager.DataStorage.Data{
  data: map(),
  metadata: map()
}

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 Functions

Link to this function

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()
}

Link to this function

new(data_map) View Source
new(data_map :: map()) :: %Auctoritas.AuthenticationManager.DataStorage.Data{
  data: term(),
  metadata: term()
}

Link to this function

new(data, metadata) View Source
new(data :: map(), metadata :: map()) ::
  %Auctoritas.AuthenticationManager.DataStorage.Data{
    data: term(),
    metadata: term()
  }

Link to this function

update_data(data, new_data) View Source
update_data(
  data :: %Auctoritas.AuthenticationManager.DataStorage.Data{
    data: term(),
    metadata: term()
  },
  data :: map()
) :: %Auctoritas.AuthenticationManager.DataStorage.Data{
  data: term(),
  metadata: term()
}

Link to this function

update_metadata(data, new_metadata) View Source
update_metadata(
  data :: %Auctoritas.AuthenticationManager.DataStorage.Data{
    data: term(),
    metadata: term()
  },
  new_metadata :: map()
) :: %Auctoritas.AuthenticationManager.DataStorage.Data{
  data: term(),
  metadata: term()
}