Lti_1p3.Platform.LoginHints (Lti 1p3 v0.9.0)

Link to this section Summary

Functions

Removes all login_hints older than the configured login_hint_ttl_sec value

Creates a login_hint for a user. Takes a user id for the current user in the active session. Optionally takes a context parameter to store additional information about the login_hint. The context value can be a string, map, or nil (default).

Gets a single login_hint by value Returns nil if the LoginHint does not exist.

Link to this section Functions

Link to this function

cleanup_login_hint_store()

Removes all login_hints older than the configured login_hint_ttl_sec value

Link to this function

create_login_hint(session_user_id, context \\ nil)

Creates a login_hint for a user. Takes a user id for the current user in the active session. Optionally takes a context parameter to store additional information about the login_hint. The context value can be a string, map, or nil (default).

examples

Examples

iex> create_login_hint(session_user_id)
{:ok, %LoginHint{}}
iex> create_login_hint(session_user_id)
{:error, %Lti_1p3.DataProviderError{}}
Link to this function

get_login_hint_by_value(value)

Gets a single login_hint by value Returns nil if the LoginHint does not exist.

examples

Examples

iex> get_login_hint(123)
%LoginHint{}
iex> get_login_hint(456)
nil