hydra passwordless
This commit is contained in:
5
containers/hydra-dispatcher/Dockerfile
Normal file
5
containers/hydra-dispatcher/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM cadoles/hydra-dispatcher-v1:v0.0.0-111-g2e60bdb
|
||||
|
||||
COPY hydra/providers.yml /var/www/config/hydra/providers.yml
|
||||
|
||||
COPY theme.css /var/www/public/build/theme
|
23
containers/hydra-dispatcher/hydra/providers.yml
Normal file
23
containers/hydra-dispatcher/hydra/providers.yml
Normal file
@ -0,0 +1,23 @@
|
||||
hydra:
|
||||
apps:
|
||||
- id: passwordless
|
||||
title:
|
||||
fr: addresse courriel
|
||||
en: email address
|
||||
description:
|
||||
fr: Authentification via adresse courriel
|
||||
en: Authentication by email address
|
||||
icon_url: https://upload.wikimedia.org/wikipedia/commons/4/48/You%27ve_got_mail.png
|
||||
login_url: http://127.0.0.1:7082/login
|
||||
consent_url: http://127.0.0.1:7082/consent
|
||||
logout_url: http://127.0.0.1:7082/logout
|
||||
attributes_rewrite_rules:
|
||||
username:
|
||||
- consent.session.id_token.email
|
||||
email:
|
||||
- consent.session.id_token.email
|
||||
email_verified:
|
||||
- consent.session.id_token.email_verified
|
||||
|
||||
|
||||
|
8
containers/hydra-dispatcher/theme.css
Normal file
8
containers/hydra-dispatcher/theme.css
Normal file
@ -0,0 +1,8 @@
|
||||
body > section {
|
||||
background-color: rgba(214, 170, 214, 0.575);
|
||||
}
|
||||
|
||||
input[type="radio"]:checked ~ .app-item {
|
||||
--tw-shadow: 0 10px 15px -3px rgb(22 78 99 / 0.3), 0 4px 6px -4px rgb(22 78 99 / 0.3);
|
||||
background-color: rgba(251, 255, 21, 0.507);
|
||||
}
|
19
containers/hydra/clients.d/nineskeletor.json
Normal file
19
containers/hydra/clients.d/nineskeletor.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"client_id": "nineskeletor",
|
||||
"client_name": "Nineskeletor",
|
||||
"client_secret": "changeme",
|
||||
"grant_types": [
|
||||
"authorization_code",
|
||||
"refresh_token"
|
||||
],
|
||||
"jwks": {},
|
||||
"metadata": {},
|
||||
"token_endpoint_auth_method": "client_secret_post",
|
||||
"post_logout_redirect_uris": ["https://127.0.0.1:8000"],
|
||||
"redirect_uris": ["https://127.0.0.1:8000/oauth2/callback"],
|
||||
"response_types": [
|
||||
"code"
|
||||
],
|
||||
"logo_uri": "https://upload.wikimedia.org/wikipedia/commons/e/e1/Password.svg",
|
||||
"scope": "openid"
|
||||
}
|
22
containers/postgresql/init-user-db.sh
Executable file
22
containers/postgresql/init-user-db.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function create_user_and_database() {
|
||||
local database=$1
|
||||
echo " Creating user and database '$database'"
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
|
||||
CREATE USER $database;
|
||||
CREATE DATABASE $database;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $database TO $database;
|
||||
EOSQL
|
||||
}
|
||||
|
||||
if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
|
||||
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
|
||||
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do
|
||||
create_user_and_database $db
|
||||
done
|
||||
echo "Multiple databases created"
|
||||
fi
|
Reference in New Issue
Block a user