GithubHelp home page GithubHelp logo

prodrivers / simplesamlphp-module-sqlauthphppassword Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hvirring/simplesamlphp-sqlauthbcrypt

0.0 3.0 1.0 8 KB

An authentication module for SimpleSAMLphp that assumes password hashes are stored cryptographically secure. Archived as no longer actively used or developed.

Home Page: http://simplesamlphp.org

License: MIT License

PHP 100.00%

simplesamlphp-module-sqlauthphppassword's Introduction

sqlauthPHPPassword:SQL

This is an authentication module for SimpleSAMLphp to authenticate a user against a SQL database table.

It uses PHP's built-in password_verify functions to securelly store password.

The implementation is based heavily on SimpleSAMLphp modules sqlauth:SQL and sqlauthBcrypt:SQL.

Options

dsn : The DSN which should be used to connect to the database server. Check the various database drivers in the PHP documentation for a description of the various DSN formats.

username : The username which should be used when connecting to the database server.

password : The password which should be used when connecting to the database server. If you are running this locally for development and you are using an empty password, set this to the empty string ('').

query : The SQL query which should be used to retrieve the user. The parameters :username and :password are available. If the username/password is incorrect, the query should return no rows. The name of the columns in resultset will be used as attribute names. If the query returns multiple rows, they will be merged into the attributes. Duplicate values and NULL values will be removed.

pepper : The pepper string appended to passwords before generating the hash. If you are not using a pepper, set this to the empty string ('').

hash_column : The column storing password hashes.

Examples

Example - MySQL server:

'phppassword-example' => array(
  'sqlauthphppassword:SQL',
  'dsn' => 'mysql:host=<hostname>;dbname=<database name>',
  'username' => '<database user>',
  'password' => '<database user password>',
  'hash_column' => 'password_hash',
  'query' => 'SELECT username AS uid, name AS cn, email AS mail, password_hash FROM users WHERE username = :username',
  'pepper' => '<random string>',
),

simplesamlphp-module-sqlauthphppassword's People

Contributors

horgeon avatar hvirring avatar

Watchers

 avatar  avatar  avatar

Forkers

povoq

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.