Giter Site home page Giter Site logo

user_external_pgsql's Introduction

External PostgreSQL authentication for Owncloud

This is an extension for the user_external app for owncloud that adds authentication against an external PostgreSQL database. It is ported from the original extension by Jakob Nixdorf

Installation

Just download/clone this GitHub repository into the apps folder of you owncloud installation.

Configuration

For this app to work the user_external app (included in owncloud) has to be enabled as well. This can be done by using the internal Apps menu in your owncloud installation or with the occ command:

occ app:enable user_external
occ app:enable user_external_pgsql

After both apps are enabled you have to add the database configuration to your config.php:

'user_backends' => array (
    0 => array (
        'class' => 'OC_User_PgSQL',
        'arguments' => array (
            0 => 'hostname',
            1 => 'username',
            2 => 'password',
            3 => 'database',
            4 => 'password_query',
            5 => 'displayname_query',
        ),
    ),
),

Parameters

  1. hostname (required): Hostname of the PostgreSQL server
  2. username (required): Username of the PostgreSQL user
  3. password (required): Password of the PostgreSQL user
  4. database (required): Name of the PostgreSQL database
  5. password_query (required): PostgreSQL query for getting the password of a user from the database. Use %u as placeholder for the username ans %p for password (example: SELECT password FROM users WHERE username='%u' and password='%p').
  6. displayname_query (optional): PostgreSQL query for getting the displayname of a user from the database. Use %u as placeholder for the username (example: SELECT fullname FROM users WHERE username='%u').

Displayname

In addition to checking a users password this app can also set the display name/full name of the user during his first login. For this to work you have to set the optional displayname_query parameter in the config.php (see above). This feature is totally optional and is not used as long as you don't specify the query parameter.

Password validation

The actual pasword valication was moved to a database operation. Plain text passwords should only be used for testing purposes, for real world scenarios this should be based on pgcrypto

user_external_pgsql's People

Contributors

flocke avatar stefansaenger avatar

Watchers

 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.