exshopify v0.9.0 Shopify.Multipass
Logins can be accomplished by enabling the Multipass feature on your Shopify Plus account. This requires the use of a special Multipass session token. https://help.shopify.com/en/api/reference/plus/multipass
Link to this section Summary
Functions
Encrypts a message using the given encryption key. This will pad the message according to the block size. Returns the encrypted message as cipher text
Simple getter to expose the module attribute
Splits the multipass secret into 2 binaries, each containing exactly the block size number of bytes. Returns a tuple where the first item is the encryption_key, the second is the signature_key
Calculates the Shopify Multipass token: an encrypted and signed message containing the customer data to be used for the Multipass SSO
Get the full URL for the Multipass signin
Pads the message string with extra bytes to ensure it is evenly divisible by the block size. See http://erlang.org/doc/man/crypto.html#block_encrypt-4
Signs the given cipher text message using the provided signature key
Link to this section Functions
encrypt(message, encryption_key, block_size \\ 16)
Encrypts a message using the given encryption key. This will pad the message according to the block size. Returns the encrypted message as cipher text.
get_block_size()
Simple getter to expose the module attribute
get_keys(multipass_secret, block_size \\ 16)
Splits the multipass secret into 2 binaries, each containing exactly the block size number of bytes. Returns a tuple where the first item is the encryption_key, the second is the signature_key
get_token(customer_data, multipass_secret, config_opts \\ %{})
Calculates the Shopify Multipass token: an encrypted and signed message containing the customer data to be used for the Multipass SSO.
get_url(shop_name, customer_data, multipass_secret, config_opts \\ %{})
Get the full URL for the Multipass signin.
pad(string, block_size \\ 16)
Pads the message string with extra bytes to ensure it is evenly divisible by the block size. See http://erlang.org/doc/man/crypto.html#block_encrypt-4
sign(cipher_text, signature_key)
Signs the given cipher text message using the provided signature key