Skip to content

Commit

Permalink
Prettier linting
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Sep 22, 2024
1 parent 37c94a4 commit 75ceb0b
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ body:
label: Is there an existing issue for this?
description: Search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
Expand All @@ -36,7 +36,7 @@ body:
description: |
Version where you observed this issue
placeholder: |
vX.Y.Z
vX.Y.Z
render: markdown
validations:
required: true
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ body:
render: markdown
validations:
required: false

1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ updates:
directory: "/"
schedule:
interval: "daily"

2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Dependabot auto-merge'
name: "Dependabot auto-merge"
on: pull_request

permissions:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
Expand All @@ -9,7 +9,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions: {}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions: {}
Expand All @@ -14,7 +14,7 @@ jobs:
pull:
strategy:
matrix:
platform: ['linux/amd64', 'linux/arm64']
platform: ["linux/amd64", "linux/arm64"]
runs-on: ubuntu-latest
steps:
- name: Set REPOSITORY
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions: {}
Expand Down Expand Up @@ -64,4 +64,4 @@ jobs:
VALIDATE_ALL_CODEBASE: true
LINTER_RULES_PATH: .
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/osv-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ name: OSV-Scanner

on:
pull_request:
branches: [ "main" ]
branches: ["main"]
push:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- main
- 'releases/**'
- "releases/**"
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions: read-all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Trigger Release
on:
push:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignore": [
".github/workflows/dockerimage.yml",
".github/workflows/dockerrelease.yml"
".github/workflows/dockerimage.yml",
".github/workflows/dockerrelease.yml"
]
}
60 changes: 31 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,38 @@ details (including the raw tokens) in the logs printed by the docker
container.

A successful sign in would result in the display of a JSON document like this one:

```json
{
"options": {
"client_id": "id",
"discovery": "http:\/\/192.168.0.1:8081\/realms\/master\/.well-known\/openid-configuration",
"redirect_uri": "http:\/\/localhost:8080\/login",
"ssl_verify": "no",
"client_secret": "835e0717-e0c8-4b57-b044-295fa0e3f61b"
},
"id_token": {
"azp": "debugger",
"iat": 1590619714,
"iss": "http:\/\/192.168.0.1:8081\/realms\/master",
"aud": "debugger",
"nonce": "1e23537bb06f2b4e324d12d8d51f2c6b",
"exp": 1590619774,
"jti": "9a1b5cf6-87ab-4557-a4aa-b771a67af1db",
"sub": "38b4a290-5332-4c4c-bb8f-46eb2826c7ea",
"email_verified": false,
"acr": "1",
"preferred_username": "tom",
"auth_time": 1590619714,
"session_state": "fb3edcc2-f5b3-47fa-84f6-60cbae792cde",
"typ": "ID"
},
"user": {
"email_verified": false,
"preferred_username": "tom",
"sub": "38b4a290-5332-4c4c-bb8f-46eb2826c7ea"
},
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJwbjdtd1B1WDZ5ZjBvSHEtTDFiZ2l6T2FVeGs5aDlGaU8ycjlMcV9LYkNRIn0.eyJleHAiOjE1OTA2MTk3NzQsImlhdCI6MTU5MDYxOTcxNCwiYXV0aF90aW1lIjoxNTkwNjE5NzE0LCJqdGkiOiI5MTk0ODgxZS05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LCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0b20ifQ.NCFiSW3Tt7qQCtE8g46kLg-oSqKiDseg4NCwV1kVPoD5yFa9XunooVE3eO1XgKACb_FFzrxEMYfmStpvypI7VFu-XO5ULkrbXElhDtMmVbEn-aqNILHs_h_Ewo1JdCa-gNL9zav5QhmcwmIUpNYsDsQxm-bN86JgQO2f8ZJ497K6DpPFnIrhd0eT0fa4iw7Tx64PdIDUPXqqYrR2nh0P-D0dkkVTSu-EI14uuwwClYy5Pq9EeKfX9M8SqUp81gprhty-9PneDcFjBpEgFRCfFhecSBn0_c1urlx5QTbN96PnCWlH2t-aGLfRHD8oJcv-xztHt02Zhy-L2B3z-bCfSQ"
"options": {
"client_id": "id",
"discovery": "http://192.168.0.1:8081/realms/master/.well-known/openid-configuration",
"redirect_uri": "http://localhost:8080/login",
"ssl_verify": "no",
"client_secret": "835e0717-e0c8-4b57-b044-295fa0e3f61b"
},
"id_token": {
"azp": "debugger",
"iat": 1590619714,
"iss": "http://192.168.0.1:8081/realms/master",
"aud": "debugger",
"nonce": "1e23537bb06f2b4e324d12d8d51f2c6b",
"exp": 1590619774,
"jti": "9a1b5cf6-87ab-4557-a4aa-b771a67af1db",
"sub": "38b4a290-5332-4c4c-bb8f-46eb2826c7ea",
"email_verified": false,
"acr": "1",
"preferred_username": "tom",
"auth_time": 1590619714,
"session_state": "fb3edcc2-f5b3-47fa-84f6-60cbae792cde",
"typ": "ID"
},
"user": {
"email_verified": false,
"preferred_username": "tom",
"sub": "38b4a290-5332-4c4c-bb8f-46eb2826c7ea"
},
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJwbjdtd1B1WDZ5ZjBvSHEtTDFiZ2l6T2FVeGs5aDlGaU8ycjlMcV9LYkNRIn0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RzIiwicXVlcnktZ3JvdXBzIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0b20ifQ.NCFiSW3Tt7qQCtE8g46kLg-oSqKiDseg4NCwV1kVPoD5yFa9XunooVE3eO1XgKACb_FFzrxEMYfmStpvypI7VFu-XO5ULkrbXElhDtMmVbEn-aqNILHs_h_Ewo1JdCa-gNL9zav5QhmcwmIUpNYsDsQxm-bN86JgQO2f8ZJ497K6DpPFnIrhd0eT0fa4iw7Tx64PdIDUPXqqYrR2nh0P-D0dkkVTSu-EI14uuwwClYy5Pq9EeKfX9M8SqUp81gprhty-9PneDcFjBpEgFRCfFhecSBn0_c1urlx5QTbN96PnCWlH2t-aGLfRHD8oJcv-xztHt02Zhy-L2B3z-bCfSQ"
}
```

Expand Down Expand Up @@ -157,6 +158,7 @@ Keycloak as a local OpenID Connect Provider.

Launch Keycloak using the following command (choosing the desired
username and password):

```bash
docker run -i -e 'KEYCLOAK_ADMIN=admin' -e 'KEYCLOAK_ADMIN_PASSWORD=admin' -p 8081:8080 quay.io/keycloak/keycloak:latest start-dev
```
Expand Down
14 changes: 7 additions & 7 deletions openid-connect-provider-debugger/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
version: "3.8"

services:
sut:
build:
context: .
dockerfile: Dockerfile-test
links:
- openid-connect-provider-debugger
- openid-connect-provider-debugger
openid-connect-provider-debugger:
build:
context: .
dockerfile: Dockerfile
environment:
- oidc_client_id=kbyuFDidLLm280LIwVFiazOqjO3ty8KH
- oidc_client_secret=60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa
- oidc_discovery=https://samples.auth0.com/.well-known/openid-configuration
- oidc_redirect_uri=http://openid-connect-provider-debugger/login
- oidc_ssl_verify=yes
- oidc_client_id=kbyuFDidLLm280LIwVFiazOqjO3ty8KH
- oidc_client_secret=60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa
- oidc_discovery=https://samples.auth0.com/.well-known/openid-configuration
- oidc_redirect_uri=http://openid-connect-provider-debugger/login
- oidc_ssl_verify=yes
16 changes: 9 additions & 7 deletions openid-connect-provider-debugger/error.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Unexpected error</title>
</head>
<body>
<center><b>An unexpected error occurred, please see console log for details.</b></center>
</body>
<head>
<meta charset="utf-8" />
<title>Unexpected error</title>
</head>
<body>
<center>
<b>An unexpected error occurred, please see console log for details.</b>
</center>
</body>
</html>
42 changes: 25 additions & 17 deletions openid-connect-provider-debugger/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenID Connect Provider Debugger</title>
</head>
<body>
<form action="/debug" target="_self">
<label for="oidc_client_id">Client ID:</label><br>
<input type="text" id="oidc-client-id" name="oidc_client_id"><br>
<label for="oidc_client_secret">Client secret:</label><br>
<input type="text" id="oidc-client-secret" name="oidc_client_secret"><br>
<label for="oidc_discovery">Discovery URL:</label><br>
<input type="text" id="oidc-discovery" name="oidc_discovery"><br>
<label for="oidc_redirect_uri">Redirect URI:</label><br>
<input type="text" id="oidc-redirect-uri" name="oidc_redirect_uri"><br>
<input type="submit" value="Start">
</form>
</body>
<head>
<meta charset="utf-8" />
<title>OpenID Connect Provider Debugger</title>
</head>
<body>
<form action="/debug" target="_self">
<label for="oidc_client_id">Client ID:</label><br />
<input type="text" id="oidc-client-id" name="oidc_client_id" /><br />
<label for="oidc_client_secret">Client secret:</label><br />
<input
type="text"
id="oidc-client-secret"
name="oidc_client_secret"
/><br />
<label for="oidc_discovery">Discovery URL:</label><br />
<input type="text" id="oidc-discovery" name="oidc_discovery" /><br />
<label for="oidc_redirect_uri">Redirect URI:</label><br />
<input
type="text"
id="oidc-redirect-uri"
name="oidc_redirect_uri"
/><br />
<input type="submit" value="Start" />
</form>
</body>
</html>

0 comments on commit 75ceb0b

Please sign in to comment.