allthings-auth-adapter
This application can act as a proxy for other applications to authenticate with the Allthings Platform.
It provides OAuth 2.0 and OpenID Connect endpoints that adapt Allthings authentication for third-party services like Nextcloud.
Installation
Prerequisites
- Crystal 1.18.2 or higher
- Docker (for containerized deployment)
Using Docker
Pull or build the Docker image:
docker build -t allthings-auth-adapter .
Run the container:
docker run -p 3000:3000 allthings-auth-adapter
From Source
Install dependencies:
shards install
Build the application:
shards build --production --release
The binary will be available at bin/allthings-auth-adapter.
Usage
The application exposes the following endpoints:
GET /- Health check endpointGET /authorize- OAuth authorization endpoint (proxies to Allthings with modified scope)GET /userinfo- OpenID Connect UserInfo endpointGET /profile/nextcloud- Nextcloud-specific profile adapterGET /.well-known/openid-configuration- OpenID Connect discovery document
Running the Server
./bin/allthings-auth-adapter
By default, the server runs on port 3000.
Integration Example
Configure your OAuth client to use:
- Authorization endpoint:
https://your-domain/authorize - Token endpoint:
https://accounts.allthings.me/oauth/token - UserInfo endpoint:
https://your-domain/userinfo
Development
Setup
- Install Crystal 1.18.2
- Install dependencies:
shards install - Run tests:
crystal spec
Running in Development
crystal run src/app.cr
Running Tests
crystal spec
Contributing
- Fork it (https://github.com/wbg-huebergass/allthings-auth-adapter/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Daniel Illi - creator and maintainer