Git Product home page Git Product logo

contao-fe-openid-provider's Introduction

Contao 4 OpenID provider for frontend users

Contao is an Open Source PHP Content Management System for people who want a professional website that is easy to maintain. Visit the project website for more information.

This bundle contains a simple provider for OAuth authorization for single sign on applications. User credentials are stored in Contao and user details are available through the OpenID mechanism.

Installation

  1. Install this extension with composer.
  2. Then create the required keys. For detailed instruction, see library instructions.
  3. Configure the extension.

Install:

composer require erikwegner/fe-openid-provider

Generate a key:

openssl genrsa -out private.key 2048

Extract the public key from the private key

openssl rsa -in private.key -pubout -out public.key

The private key must be kept secret (i.e. out of the web-root of the authorization server). The authorization server also requires the public key.

Generate a string password:

php -r 'echo base64_encode(random_bytes(32)), PHP_EOL;'

Add settings to app/config/config.yml:

contao:
  localconfig:
    feopenidprovider:
      keypath: <path to generated keys>
      encryptionkey: <generated string password>

Usage

  1. Create a client in Contao (System » Members-OpenID).
  2. Setup a login page at /fe-login.html.
    1. Create a page.
    2. Add a login form.
    3. Enable Redirect back for the login form.

Client OpenID settings:

Grant Type: authorization code Callback URL: One of the configured redirect URI values Auth URL: https://your.contao.install/fe/authorize Access Token URL: https://your.contao.install/fe/access_token Client ID: The configured identifier for the app Scope: email|basic

contao-fe-openid-provider's People

Contributors

erikwegner avatar

Stargazers

Thomas Kaltbeitzel avatar

Watchers

 avatar James Cloos 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.