Git Product home page Git Product logo

haytni's Introduction

Haytni

Haytni is a configurable authentication system for Phoenix, inspired by Devise and mix phx.gen.auth

(end) goals:

  • security focused
  • provides a strong and ready to use base
  • non-bloatware:
    • all logics are not located in controllers
    • minimize changes on upgrades
  • easily customisable and extendable:
    • enable (or disable) any plugin
    • add your own plugins to the stack

The only things you install in your project are:

  • migrations
  • views (you may need some custom helpers for your templates)
  • templates (for emails and web pages)

If you need your own features, you write (and test) your own plugins:

  • no need to change some obscur and very long code you may not understand, you just need to implement the callbacks that feet your needs
  • your changes will not impact and break anything else (starting by tests)

Important note: Haytni cannot be used in an umbrella-ed Phoenix application.

Plugins:

  • authenticable (Haytni.AuthenticablePlugin): handles hashing and storing an encrypted password in the database
  • registerable (Haytni.RegisterablePlugin): the elements to create a new account or edit its own account
  • rememberable (Haytni.RememberablePlugin): provides "persistent" authentication (the "remember me" feature)
  • confirmable (Haytni.ConfirmablePlugin): accounts have to be validated by email
  • recoverable (Haytni.RecoverablePlugin): recover for a forgotten password
  • lockable (Haytni.LockablePlugin): automatic lock an account after a number of failed attempts to sign in
  • last_seen (Haytni.LastSeenPlugin): register the last time a user signed in
  • trackable (Haytni.TrackablePlugin): register users's connections (the IP addresses he used)
  • invitable (Haytni.InvitablePlugin): registration on invitation or sponsorship
  • password policy (Haytni.PasswordPolicyPlugin): basic validations against passwords (length and minimal character types presence)
  • liveview (Haytni.LiveViewPlugin): provides authentication to channels and liveview if the _csrf_token cookie is not available
  • clearsitedata (Haytni.ClearSiteDataPlugin): set the HTTP header Clear-Site-Data on logout (and eventually login)
  • encrypted_email (Haytni.EncryptedEmailPlugin): keep the email in an hashed form to prevent abuse (deleting the account then recreate it with same address)
  • anonymization (Haytni.AnonymizationPlugin): anonymize user's data on account deletion
  • rolable (Haytni.RolablePlugin): everything (Ecto associations and management interface) you need to get roles support

Documentation can be found at https://hexdocs.pm/haytni.

Installation is described here.

BEWARE: this README (and the whole master branch) might be out of sync with hexdocs (last release)

haytni's People

Contributors

julp avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.