Giter Club home page Giter Club logo

yourls-oidc's Introduction

YOURLS-OIDC

OpenID Connect Authentication for YOURLS

This plugin enables authentication against a generic OpenID Connect server in YOURLS.

Features

  • Respects YOURLS auth flow
  • Respects YOURLS hard-coded logins, if desired
  • Can link OpenID Connect accounts to existing YOURLS accounts
  • Sets user to sub, sets display name to preferred_username
  • Single Sign Out: signing out of YOURLS signs off OIDC server.

Requirements

Installation

  1. Download this repo and extract the oidc folder into YOURLS/user/plugins/
  2. cd to the directory you just created
  3. Run composer install in that directory to fetch the OIDC library
  4. Define OIDC server parameters (see below)
  5. configure OIDC, see below.
  6. Enable in Admin

Configuration

Config: user/config.php file.

// oidc server
define( 'OIDC_BASE_URL', 'https://keycloak.example.com/auth/realms/master/' );
define( 'OIDC_CLIENT_NAME', 'YOURLS' );
define( 'OIDC_CLIENT_SECRET', 'YOUR-SUPER-SECRET-HASH' );
// Option 1: link OIDC users to local YOURLS users
$oidc_profiles = array( 
	'YOURLS_UNAME' => 'sub attribute from OIDC provider',
);
// Option 2, all users on OIDC platform have YOURLS accounts. uses 'preferred_username' attribute
define( 'OIDC_BYPASS_YOURLS_AUTH', true );
// If behind Reverse Proxies YOURLS URL might be incorrectly detected for redirects; manually set it here to force redirects to the right page. 
// Note it points to /admin/ and not the root.
define( 'OIDC_REDIRECT_URL', 'https://yourls.example.com/admin/' );

In Development

  • Tight integration with AuthMgrPlus
    • Group and attribute assignment
  • User panel in admin for linking to existing accounts with the push of a button

Tips

Dogecoin: DARhgg9q3HAWYZuN95DKnFonADrSWUimy3

License

Copyright 2019 Joshua Panter

yourls-oidc's People

Contributors

joshp23 avatar fservida avatar dependabot-preview[bot] 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.