D2lvalenceElixir.Auth.D2LUserContext.new
You're seeing just the function
new
, go back to D2lvalenceElixir.Auth.D2LUserContext module for more information.
Specs
new(%{ host: String.t(), user_id: String.t(), user_key: String.t(), app_id: String.t(), app_key: String.t(), encrypt_requests: true | false, server_skew: integer() }) :: {:error, String.t()} | {:ok, %D2lvalenceElixir.Auth.D2LUserContext{ anonymous: false | true, app_id: String.t(), app_key: String.t(), encrypt_requests: boolean(), host: String.t(), scheme: String.t(), server_skew: integer(), user_id: String.t(), user_key: String.t() }}
Constructs a new authenticated calling user context.
Clients are not intended to invoke this constructor directly; rather
they should use the D2LAppContext.create_user_context()
factory
method, or the fashion_user_context()
factory function.
:param hostName: Host/port string for the back-end service. :param user_id: User ID provided by the back-end service to the
authenticated client application.
:param user_key: User Key provided by the back-end service to the
authenticated client application.
:param encrypt_requests: If true, use HTTPS for requests made through
this user context; if false (the default), use
HTTP.
:param server_skew: Time skew between the service's time and the client
application's time, in milliseconds.
:param signer: A signer instance that implements D2LSigner.
:return error:: If you provide None
for hostName, port, user_id,
or user_key parameters.