Giter Site home page Giter Site logo

q2a-admidio's Introduction

Question2Answer Single Sign-on with Admidio

Please read Installing Question2Answer with single sign-on before proceeding.

Question2Answer (q2a) can delegate its entire user management to a third party. Here we will delegate q2a user management to Admidio. Q2A has a framework to make it happen. This kind of framework allows an application to be semi-embedded into another application. Many small applications should be embeddable into another bigger application. It will improve user experience across multiple applications. A user centric application like Admidio should become a host for many embeddable applications.

Q2A-Admidio Configuration

Both Q2A and Admidio will be sharing the same database access with each prefixed table set. It means both applications will be installed in the same web host. In this configuration, Admidio will be installed in the main domain (https://agromaya.net/), and q2a will be installed in a sub-domain (https://ask.agromaya.net/). You can have a different configuration. The idea is that both applications can share the same user session. Admidio keeps user session in cookie. So, q2a needs to access the same cookie. You need to set QA_COOKIE_DOMAIN in qa-config.php to point to Admidio domain .agromaya.net (must keep the leading period). Domain-subdomain cookie accessibility can be tricky. You may need to see Allow php sessions to carry over to subdomains.

Admidio Session Cookie

Admidio maintains user sessions in database through the adm_sessions table. And the session id is kept in $_COOKIE with a formatted name as follow:

[ADMIDIO_<Admidio-organization-name>_<database-name>_<Admidio-table-prefix>_SESSION_ID]

The angle brackets are placeholders which are separated by underscores.

The cookie name indicates that a user can have simultaneous sessions with multiple Admidio organizations at the same time. However, there can only be one user session per organization. The cookie name starts with ADMIDIO_ and ends with _SESSION_ID. We can just ignore anything in between and assume there is only one Admidio user for a device. The session id will lead us to the user id in the Admidio adm_sessions table. And the user id will lead us to all other user data such as user name, email address, and photo.

q2a-admidio's People

Contributors

chelahmy 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.