All Projects → tekul → broch

tekul / broch

Licence: BSD-3-Clause license
OAuth2 and OpenID Connect in Haskell

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to broch

Oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Stars: ✭ 2,323 (+5430.95%)
Mutual labels:  openid-connect
undertow-pac4j
Security library for Undertow: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 35 (-16.67%)
Mutual labels:  openid-connect
sotsera.blazor.oidc
OpenID Connect client for Blazor client-side projects
Stars: ✭ 21 (-50%)
Mutual labels:  openid-connect
Nginx Sso
SSO authentication provider for the auth_request nginx module
Stars: ✭ 195 (+364.29%)
Mutual labels:  openid-connect
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+450%)
Mutual labels:  openid-connect
AspNetCore6Experiments
ASP.NET Core Blazor BFF with Azure AD and Razor page
Stars: ✭ 43 (+2.38%)
Mutual labels:  openid-connect
Theidserver
OpenID/Connect server based on IdentityServer4
Stars: ✭ 170 (+304.76%)
Mutual labels:  openid-connect
jax-rs-pac4j
Security library for JAX-RS and Jersey
Stars: ✭ 48 (+14.29%)
Mutual labels:  openid-connect
Authing
🔥Authing - IDaaS/IAM solution that can Auth to web and mobile applications.
Stars: ✭ 247 (+488.1%)
Mutual labels:  openid-connect
auth-backends
Custom authentication backends and views for edX services
Stars: ✭ 20 (-52.38%)
Mutual labels:  openid-connect
Auth0.net
.NET client for the Auth0 Authentication & Management APIs.
Stars: ✭ 200 (+376.19%)
Mutual labels:  openid-connect
Identityserver
An open-source, standards-compliant, and flexible OpenID Connect and OAuth 2.x framework for ASP.NET Core
Stars: ✭ 223 (+430.95%)
Mutual labels:  openid-connect
Multitenancy-Microservice-FederatedIdentity-Example
Multitenancy Federated Identity Example ASP.NET MVC C#
Stars: ✭ 33 (-21.43%)
Mutual labels:  openid-connect
Oidc.example
OIDC (OpenID Connect) Example for http://openid.net/connect/
Stars: ✭ 190 (+352.38%)
Mutual labels:  openid-connect
angular-openid-connect-php
Angular & PHP CodeIgniter server through OAuth 2.0 OpenID Connect
Stars: ✭ 14 (-66.67%)
Mutual labels:  openid-connect
External Auth Server
easy auth for reverse proxies
Stars: ✭ 189 (+350%)
Mutual labels:  openid-connect
node-jose-tools
Command line tools for node-jose's features
Stars: ✭ 29 (-30.95%)
Mutual labels:  openid-connect
todos-express-openidconnect
Todo app using Express, Passport, and SQLite for sign in via OpenID Connect.
Stars: ✭ 14 (-66.67%)
Mutual labels:  openid-connect
oidc
Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation
Stars: ✭ 475 (+1030.95%)
Mutual labels:  openid-connect
oidc-client-bound-assertions-spec
An extension of OpenID Connect for credential issuance
Stars: ✭ 13 (-69.05%)
Mutual labels:  openid-connect

Broch

A Haskell implementation of OpenID Connect.

Build Status

Building

The easiest option is to use stack, particularly if you are new to Haskell. Follow the instructions to download and install stack (just adding the stack binary to your path), then

$ git clone https://github.com/tekul/broch
$ cd broch

If you don't already have a compatible ghc version installed, you can get stack to install one by running

$ stack setup

To build the project run

$ stack build

Running with SQLite

If all goes well you can then run the command-line server, and start it with a sqlite database

$ stack exec broch -- --help
$ stack exec broch -- --back-end=SQLITE --issuer=http://localhost:3000

The SQLite database creates a broch.db3 file for the database. It automatically creates the schema and adds a test user (username: "cat", password: "cat") and a client called "app". You should then be able to paste the following authorization request into your browser

http://localhost:3000/oauth/authorize?client_id=app&state=somerandomstate&response_type=code&redirect_uri=http%3A%2F%2Flocalhost:8080/app

After logging in, you will be redirected to the client app URL with a code parameter. This will give a 404, since the client isn't actually running, but you can use a utility like curl to mimic the client's interaction with the token endpoint and exchange the code for an access token.

PostgresSQL Backend

By default, broch uses a PostgresSQL database for storage. Version 9.5 or greater is required. There are two initialization scripts, pgdb.sql and user.sql which create the required schema. For a real deployment, you would run postgres as a system service running in the background, but you can also run it manually.

First create a directory to store the data and initialize it, then start the database

$ initdb brochdb
$ pg_ctl -D ./brochdb start

Then we run the psql client, create a new database and run the initialization scripts

$ psql -u postgres

postgres=# create database broch;
postgres=# \connect broch
broch=# \i pgdb.sql
broch=# \i user.sql
broch=# \q

You should then have a database the server can run against, as well as the same test user and client application as for SQLite. The default connection string is dbname=broch so it should work with the database we just created.

$ stack exec broch -- --issuer=http://localhost:3000
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].