Skip to content

Commit

Permalink
Update oauth2-keycloak dependency to 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurtemple committed Jun 21, 2023
1 parent 988fb31 commit 2bda37c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ composer require spookygames/flarum-ext-auth-keycloak

## Keycloak setup

Written for Keycloak version 4.8.3-final, tested up to 13.0.1, and Flarum 1.3.0. Your mileage may vary.
Written for Keycloak version 4.8.3-final, tested up to 21.1.1, and Flarum 1.3.0. Your mileage may vary.

From the _Clients_ tab, add a new client for your Flarum instance (or use an existing one). Root URL should be the URL of your Flarum instance.

Expand All @@ -37,7 +37,8 @@ From the _Realm Settings_ tab, find the key used by the OpenId Connect workflow
## Extension settings

In the end, extension settings will be:
* Server URL: the URL to your Keycloak instance, like https://keycloak.example.com/auth. Beware the "auth" with no trailing slash.
* Keycloak version: the version of your Keycloak instance.
* Server URL: the URL to your Keycloak instance, like https://keycloak.example.com/auth. Beware the "auth" with no trailing slash for Keycloak versions < 20.
* Realm: the authentication realm you created for your Flarum.
* Client ID: the name of the client you created above.
* Client Secret: defaults to client ID if you do not override.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require": {
"flarum/core": "^1.3",
"stevenmaguire/oauth2-keycloak": "2.2.2"
"stevenmaguire/oauth2-keycloak": "4.0.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion js/src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ const translationPrefix = 'flarum-ext-auth-keycloak.admin.keycloak_settings.';
app.initializers.add('spookygames-auth-keycloak', app => {
app.extensionData
.for('spookygames-auth-keycloak')
.registerSetting(
{
setting: settingsPrefix + 'keycloak_version',
label: app.translator.trans(translationPrefix + 'keycloak_version_label'),
type: 'text',
placeholder: '21.1.1',
}
)
.registerSetting(
{
setting: settingsPrefix + 'server_url',
label: app.translator.trans(translationPrefix + 'server_url_label'),
type: 'text',
placeholder: 'https://keycloak.example.com/auth',
placeholder: 'https://keycloak.example.com',
}
)
.registerSetting(
Expand Down
1 change: 1 addition & 0 deletions locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ flarum-ext-auth-keycloak:
admin:
keycloak_settings:
title: "Keycloak Settings"
keycloak_version_label: "Keycloak version"
server_url_label: "Server URL"
realm_label: "Realm"
client_id_label: "Client ID"
Expand Down
Loading

0 comments on commit 2bda37c

Please sign in to comment.