Lti_1p3.Tool (Lti 1p3 v0.1.0)

Link to this section Summary

Functions

Creates a new deployment.

Creates a new registration.

Gets a user's cached lti_params from the given sub. Returns nil if the lti_params do not exist.

Gets the registration and deployment associated with the given issuer, client_id and deployment_id.

Link to this section Functions

Link to this function

create_deployment(deployment)

Creates a new deployment.

Examples

iex> create_deployment(deployment)
{:ok, %Lti_1p3.Tool.Deployment{}}
iex> create_deployment(deployment)
{:error, %Lti_1p3.DataProviderError{}}
Link to this function

create_registration(registration)

Creates a new registration.

Examples

iex> registration(registration)
{:ok, %Lti_1p3.Tool.Registration{}}
iex> registration(registration)
{:error, %Lti_1p3.DataProviderError{}}
Link to this function

get_lti_params_by_sub(sub)

Gets a user's cached lti_params from the given sub. Returns nil if the lti_params do not exist.

Examples

iex> Lti_1p3.get_lti_params_by_sub("some-sub")
%Lti_1p3.Tool.LtiParams{}
iex> Lti_1p3.get_lti_params_by_sub("unknown-sub")
nil
Link to this function

get_registration_deployment(issuer, client_id, deployment_id)

Gets the registration and deployment associated with the given issuer, client_id and deployment_id.

Examples

iex> get_registration_deployment(issuer, client_id, deployment_id)
{%Registration{}, %Deployment{}}
iex> get_rd_by_deployment_id(issuer, client_id, deployment_id)
{nil, nil}