Skip to content

Commit 18f0f3d

Browse files
NerzalTobias Theelp53Pavol IpothJonasHeinemann
authored
WIP: Support for Keycloak 17+ / Version 19 as target (#361)
* accept interfaces, return structs * update dependencies * update go version in CI * Fix linter errors * BreakingChange: fix typo in ServerInfoRepresentation * BreakingChange: rename RetrospectTokenResult to IntrospectTokenResult * fix more linter errors * BreakingChange: Bugfix - Issue #358 CreateClientRepresentation does now require a token * upgrade for keycloak 19 * update CI * jub * cleanup * add SendVerifyEmail function * test * Fix #248 * Fix realm import (#367) * Fix realm import * Fix gocloak-realm * Add test permissions, policy * Change JS policies to client, remove test for uploading JS policy * Fix register client tests Co-authored-by: Pavol Ipoth <[email protected]> * fix tests (#379) * fix tests * Fix Comment go-linter * update dependencies and add nancy ignore case * Add -d to make file Co-authored-by: Jonas Heinemann <[email protected]> * upgrade gocloak version (#380) Co-authored-by: Tobias Theel <[email protected]> Co-authored-by: p53 <[email protected]> Co-authored-by: Pavol Ipoth <[email protected]> Co-authored-by: Jonas <[email protected]> Co-authored-by: Jonas Heinemann <[email protected]> Co-authored-by: WilliPkv <[email protected]>
1 parent b4b5d20 commit 18f0f3d

16 files changed

+1396
-1739
lines changed

.github/workflows/go.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: Setup Go environment
1010
uses: actions/[email protected]
1111
with:
12-
go-version: 1.18
12+
go-version: 1.19
1313
- name: Checkout code
1414
uses: actions/checkout@v2
1515
- name: Run golangci-lint
@@ -20,8 +20,7 @@ jobs:
2020
uses: sonatype-nexus-community/nancy-github-action@main
2121
- name: Run Keycloak
2222
run: |
23-
docker pull jboss/keycloak:12.0.3
24-
docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=secret -e KEYCLOAK_IMPORT=/tmp/gocloak-realm.json -v "`pwd`/testdata/gocloak-realm.json:/tmp/gocloak-realm.json" -p 8080:8080 --name keycloak jboss/keycloak:12.0.3 -Dkeycloak.profile.feature.upload_scripts=enabled
23+
make start-keycloak
2524
sleep 15
2625
- name: Unit Tests
2726
run: |

.nancy-ignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CVE-2019-11840
1+
CVE-2022-32149

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM quay.io/keycloak/keycloak:latest
2+
COPY testdata data/import
3+
WORKDIR /opt/keycloak
4+
ENV KC_HOSTNAME=localhost
5+
ENV KEYCLOAK_USER=admin
6+
ENV KEYCLOAK_PASSWORD=secret
7+
ENV KEYCLOAK_ADMIN=admin
8+
ENV KEYCLOAK_ADMIN_PASSWORD=secret
9+
ENV KC_FEATURES=account-api,account2,authorization,client-policies,impersonation,docker,scripts,upload_scripts
10+
RUN /opt/keycloak/bin/kc.sh import --file /data/import/gocloak-realm.json
11+
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
test:
22
./run-tests.sh
3-
3+
4+
start-keycloak:
5+
docker-compose down
6+
docker-compose up -d

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ For release notes please consult the specific releases [here](https://github.com
3232
### Installation
3333

3434
```shell
35-
go get github.com/Nerzal/gocloak/v11
35+
go get github.com/Nerzal/gocloak/v12
3636
```
3737

3838
### Importing
3939

4040
```go
41-
import "github.com/Nerzal/gocloak/v11"
41+
import "github.com/Nerzal/gocloak/v12"
4242
```
4343

4444
### Create New User

0 commit comments

Comments
 (0)