GithubHelp home page GithubHelp logo

ulrikstrid / ocaml-oidc Goto Github PK

View Code? Open in Web Editor NEW
47.0 7.0 4.0 539 KB

OpenID Connect implementation in OCaml. Currently only the RP (client) parts are polished.

Home Page: https://ulrikstrid.github.io/ocaml-oidc/

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.59% Reason 4.05% OCaml 84.56% JavaScript 4.96% Shell 1.01% Nix 4.83%
ocaml oidc oidc-client

ocaml-oidc's Introduction

ocaml-oidc

OpenID connect implementation in OCaml.

Certified OpenID Connect mark

Folder structure

ocaml-oidc
│
├─executable/  Entrypoint for a webserver/OIDC client
│
├─library/     Implementation for the webserver
│
├─oidc/        Core OIDC implementation
│
├─oidc-client/ OIDC Client implementation
│
├─test/        tests
│

Developing:

npm install -g esy redemon reenv
git clone <this-repo>
esy install
esy build

Running Binary:

After building the project, you can run the main binary that is produced. This will start a webserver with a OIDC client configured for certification.

esy start

Running Tests:

# Runs the "test" command in `package.json`.
esy test

ocaml-oidc's People

Contributors

andreypopp avatar anmonteiro avatar cironunes avatar ulrikstrid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocaml-oidc's Issues

Non-OIDC OAuth2 providers that this repo might be ported to work with

Looking through a list of OAuth providers on Wikipedia, I made a short list of "important" OAuth2 providers that it may be good to test this repo against/adapt it to. The information on Wikipedia might be out of date, the providers might be diverging from specs in various ways, so we might simply not do some of them initially. Also, some providers might have extensive additional mechanisms, and be OAuth2 only in the sense of being based on OAuth2, yet still not be OIDC. I am suspecting Instagram might have something like that (perhaps it uses Facebook Connect). So we would address each provider separately.

If we work on this, I'll gradually edit this issue with links to auth API docs, etc.

OAuth2 example: the login flow is not CSRF-safe

In the OAuth2 example, it appears to be possible to trigger login without any user interaction by causing the user's browser to do a GET /auth on the app, since the handler does not check any cookies, CSRF tokens, etc.

The OAuth2 example does not use the state parameter

A state parameter that is somehow associated with the client's user agent (usually meaning, with a cookie) is necessary to protect the OAuth2 callback from CSRF-like attacks. The library code appears to support passing state around, but the example does not use state, and it does not appear to be pointed out in the library docs.

opam release

Are there any plans to do an opam release soon? Just asking — could still work around this downstream using my much-overused rename-and-vendor workflow.

Fix CI

Since I'm not using esy anymore I should move everything to nix so that CI will work correctly

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.