Veil v0.2.4 mix veil.add View Source
Veil - simple passwordless authentication for your Phoenix apps.
This installer will do the following:
- Append the :veil configuration to your
config/config.exs
file. - Generate the Veil.User, Veil.Request and Veil.Session schemas in
lib/yourapp/veil/
- Generate an Ecto migration for these schemas in
priv/repo/migrations/
- Generate controllers, views, plugs and templates in
lib/yourapp_web/[type]/veil
- If this is a new phoenix app using the default template, modify it to include a sign in link
Examples
# Default installation
mix veil.add
Link to this section Summary
Functions
Amend the default layout file to add a Sign-in link in the top right. Do nothing if the app is an api
Set up the config map
Add the app name to config
Add the main paths of the application to config
Adds salts for the request/session internal tokens. These should only ever be saved in the database, so do not actually need to be this random
Uses Mix.Generator to copy the file across, evaluating against the binding
Create directory and copy list of files across
Copies the files in the main directory over, and evaluates against EEx using the config
Copy the migration to the priv/repo/migrations folder
Copies the templates in the web directory over (only if html)
Copies the files in the web directory over, and evaluates against EEx using the config
A task needs to implement run
which receives
a list of command line args
Gives the source path to copy files from
Verify the paths all exist
Link to this section Functions
Amend the default layout file to add a Sign-in link in the top right. Do nothing if the app is an api.
Set up the config map
Add the app name to config
Add the main paths of the application to config
Adds salts for the request/session internal tokens. These should only ever be saved in the database, so do not actually need to be this random.
Uses Mix.Generator to copy the file across, evaluating against the binding
Create directory and copy list of files across
Copies the files in the main directory over, and evaluates against EEx using the config
Copy the migration to the priv/repo/migrations folder
Copies the templates in the web directory over (only if html)
Copies the files in the web directory over, and evaluates against EEx using the config
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.
Gives the source path to copy files from
Verify the paths all exist