• Stars
    star
    35
  • Rank 724,866 (Top 15 %)
  • Language
    Elixir
  • License
    BSD 3-Clause "New...
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ecto type for saving encrypted passwords using Comeonin

Comeonin Ecto Password

A custom Ecto type for storing encrypted passwords using Comeonin

For ecto 1 compatibility use the ecto-1 branch.

Version 3.x is compatible with comeonin ~> 5.0, use version 2.x for compatibility with older versions.

Usage

On your schema, define secure fields with this type:

field :password, Comeonin.Ecto.Password

Then on your changeset simply cast from plain-text params

changeset
|> cast(attrs, [:password])
|> validate_required([:password])

After casting the password will already be encrypted in the changeset, and can be saved to your table's string column.

To check for validity, do something like:

user = Repo.get_by(User, email: "[email protected]")
Comeonin.Ecto.Password.valid?("plain_password", user.password)

Configuration

In your environment file, choose one of Pbkdf2, Bcrypt, Argon2. The default is 'Pbkdf2, but you still need to include it in your mix.exs`!

config :comeonin, Ecto.Password, Pbkdf2

# when using pkbdf2
config :comeonin, :pbkdf2_rounds, 120_000
config :comeonin, :pbkdf2_salt_len, 512

# when using bcrypt
config :comeonin, :bcrypt_log_rounds, 14

Also, be sure to look at comeonin config

Installation

Available in Hex, the package can be installed as:

Add comeonin_ecto_password to your list of dependencies in mix.exs:

def deps do
  [{:comeonin_ecto_password, "~> 3.0.0"}]
end

More Repositories

1

params

Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters.
Elixir
330
star
2

expat

Reusable, composable patterns across Elixir libraries
Elixir
175
star
3

ok_jose

Pipe elixir functions that match ok/error tuples or custom patterns.
Elixir
96
star
4

apollo-phoenix-websocket

An Apollo networkInterface for executing GraphQL queries via Phoenix Channels
JavaScript
91
star
5

typhon

Snakes on rbx-head. A Python implementation for the Rubinius VM
Ruby
83
star
6

color-theme-buffer-local

Set emacs color themes by buffer.
Emacs Lisp
78
star
7

spec

Data specification conformance and generation for Elixir
Elixir
77
star
8

mk-darwin-system

Small Nix utility to create an M1 aarch64-darwin (nixFlakes + nix-darwin + home-manager) system.
Nix
69
star
9

happy

the alchemist's happy path with elixir
Elixir
44
star
10

pipe_here

An Elixir macro for easily piping arguments at any position.
Elixir
33
star
11

happy_with

Avoid commas on Elixir's with special form.
Elixir
30
star
12

pit

Elixir macro for extracting or transforming values inside a pipe flow.
Elixir
27
star
13

pond

State aware Elixir functions without spawning processes
Elixir
27
star
14

asdf-elm

elm version manager plugin for asdf.
Shell
26
star
15

laminar_cycle

A cycle.js style user-computer model in Laminar
Scala
24
star
16

prefix-css

Prefix all rules from a css-file with a namespace selector.
CoffeeScript
23
star
17

deco

Minimalist Function Decorators for Elixir
Elixir
21
star
18

NoR

There's No Return. A javascript reactive programming engine.
JavaScript
20
star
19

indifferent

Elixir Indifferent access on maps/lists/tuples with custom key transforms.
Elixir
20
star
20

heroku-buildpack-nim

Deploy nim applications to heroku.
Shell
20
star
21

mix_under

Execute mix tasks under Elixir umbrella applications
Elixir
19
star
22

silabas.js

Spanish syllable separator in javascript
JavaScript
17
star
23

sube

Web-based Subtitle Editor.
JavaScript
17
star
24

mill-docker

Build minimalist distroless docker images for your java applications using Mill
Scala
15
star
25

phoenix_now

Example Phoenix deployment to Zeist Now.
Elixir
14
star
26

asdf-ocaml

OCaml plugin for ASDF version manager
Shell
13
star
27

ido-better-flex

A better fuzzy matching algorithm for emacs ido-mode
Emacs Lisp
12
star
28

vix

Vic's *Nix config.
Emacs Lisp
12
star
29

gooby

An experimental rubinius bytecode interpreter in Go.
Go
12
star
30

cyclone

Cyclic Airstream-based stateful components for functional-reactive interfaces on Laminar and Scala.js
Scala
12
star
31

gleam-nix

Build Gleam with Nix.
Nix
10
star
32

rouge

Ruby + Clojure = Rouge
Ruby
10
star
33

elm-facebook

Use Facebook Javascript API from inside ELM
Elm
9
star
34

swagger-elixir

Generate client and (plug) server code in elixir from a swagger api spec.
Elixir
9
star
35

verily

Demo application for APW subscriptions via websockets
Elixir
9
star
36

lispy

Lispy is sexpy Ruby
Ruby
9
star
37

mill-buildr

An small Mill module that lets you define big project structures as a regular scala project itself.
Scala
8
star
38

akin

An Akin programming language optimized for fun.
Ruby
8
star
39

having

Haskell like `where` sugar for Elixir. A pipe-able `with` special form.
Elixir
7
star
40

color-theme-select

Web based version of emacs' (color-theme-select)
JavaScript
7
star
41

tintan

Titanium development with style.
CoffeeScript
6
star
42

pinocchio

Git based server provisioning.
Shell
6
star
43

macpato

Simple pattern matching on Elixir quoted expressions.
Elixir
6
star
44

elmo

A cyclic elm architectured framework
JavaScript
6
star
45

discordex

Discord API for Elixir
Elixir
5
star
46

.hammerspoon

absolute power
Lua
5
star
47

test_async

Make tests inside your ExUnit case to run async.
Elixir
5
star
48

rex

Concatenative Elixir macro language.
Elixir
5
star
49

rojo

Rubinius bytecode interpreter in JavaScript.
5
star
50

fastparse_ext

FastParse extensions
Scala
5
star
51

vinerb

Full featured Vine API client for ruby.
Ruby
4
star
52

vee

Vic's Emacs Environment.
Emacs Lisp
4
star
53

mill-dotenv

A Mill module for twelve-factor apps loading environment variables from a local file.
Scala
4
star
54

docker-neo4j-spatial

Neo4J with spatial plugin on small alpine linux.
4
star
55

nim-heroku-example

Example nim app using heroku buildpack.
Nim
4
star
56

elaxtic

ElasticSearch client for Elixir and Ecto driver.
Elixir
4
star
57

redux-observable-adapter-xstream

Use xstream with redux-observable
JavaScript
4
star
58

redleaf

A Ruby parser producing s-exps using TreeTop.
Ruby
3
star
59

jakesmine

Add Coffee, Jake and Jasmine to your Titanium mobile development.
JavaScript
3
star
60

silabas4j

Spanish syllable separator for java
Java
3
star
61

...

start fresh.
Shell
3
star
62

knockout-jqueryBindingProvider

A binding provider for knockoutjs bind data without using data-bind on views.
JavaScript
3
star
63

clap-nix

Command line argument parser in pure Nix. Supports sub-commands, typed positional arguments, value coercion and resolution via Nix Modules.
Nix
3
star
64

jwm-tt-js-ninja

JWM TechTalk. Becomming a JavaScript Ninja.
JavaScript
3
star
65

silabas.rb

Spanish syllabe separator in ruby
Ruby
3
star
66

infancy

Programming In Fancy. An OpenSource Book to teach the Fancy Programming Language.
3
star
67

mill-scalaxb

Generate Scala from wsdl and xsd files on mill builds
Scala
3
star
68

mill-test-junit-report

Generate JUnit xml reports from Mill's test output.
Scala
3
star
69

poops

Social real time tamagotchi game.
JavaScript
3
star
70

mrT

Inverse of shell command, find file first and act accordingly on it. A fast file finder with curses interface.
Ruby
3
star
71

tito

Quickly create Titanium Mobile UI prototypes on an HTML5 canvas and export them to javascript and jss
2
star
72

elixir_idris

Idris compiler on Elixir
Elixir
2
star
73

ioke-outdated

ioke is a new language for the JVM, based on Io and other languages.
Java
2
star
74

wat.rb

Wat VM implemented in Ruby.
Ruby
2
star
75

SPC

Send keyboard macros to Spacemacs or DOOM Emacs via emacsclient.
Shell
2
star
76

blue

Blue Velvet - Block Lisp Underneath Elixir.
Elixir
2
star
77

promised

Convert back and forth from javascript Promises to Callbacks
2
star
78

jwmscript

Manipulate browser DOM and interact with Javascript libraries using your favourite JVM language
Java
2
star
79

setup_tag

Use tags to mix and match your exunit test context
Elixir
2
star
80

patuit

Twitter for ducks using polymer, neo4j and couchdb
Ruby
2
star
81

fap-fap-fap

Javascript *fap fap fap* Concatenative *fap fap fap* Combinators *fap fap fap*
2
star
82

elmx-webpack-boilerplate

Get up to speed with webpack elm + sass + elmx
JavaScript
2
star
83

knockout-routes

Routes for client-side apps powered by Knockout and History.js
CoffeeScript
2
star
84

im2fansi

Scala library to convert any image into true-color ansi text for display at terminal.
2
star
85

elmx-webpack-preloader

Compile elmx to elm files before using elm-webpack-loader
JavaScript
2
star
86

vico

vic personal homepage
JavaScript
2
star
87

redy

If javascript mews as ruby, it's a ruby.
JavaScript
2
star
88

bc-timer

A basecamp time tracking tool intended to be embedded in gmail, firefox sidebar, and kde's web plasma.
JavaScript
2
star
89

teclado-malvado

an evil keyboard for android
Java
1
star
90

exfmt

Elixir code formatting tool
1
star
91

typeset

An Scala type-indexed set, checked at compile time.
Scala
1
star
92

require.js

A simple node like synchronous require made just for the browser.
JavaScript
1
star
93

schmalz

Automatically exported from code.google.com/p/schmalz
Erlang
1
star
94

pegi

A minimalist parser expression grammar as ruby dsl
Ruby
1
star
95

eniv.co

vine's evil tween
Shell
1
star
96

ikka

Akka experiments in ioke
1
star
97

cabezon

A prototype using RaphaelJS
JavaScript
1
star
98

ice

ICE - IBE Control Examples
JavaScript
1
star
99

vic

vic readme
1
star
100

viento

No camines que despierta el viento
1
star