Compare commits

..

3 commits

Author SHA1 Message Date
c9f36f7100 Add exporting individual attributes
All checks were successful
/ Verify (pull_request) Successful in 41s
Based off #32

Also:
* rework README.md
* improve configuration error messages
2026-07-19 13:38:10 +02:00
218ee1dd57 Add just the refactoring from #26.
All checks were successful
/ Verify (pull_request) Successful in 45s
This is based off #31, so that needs to be merged first.
2026-07-19 13:21:57 +02:00
f204ab7f28 Add just the testing setup from #26.
All checks were successful
/ Verify (pull_request) Successful in 1m12s
Important: there are changes here to adapt the tests and the Keycloak test realm that are incompatible with the changes in #29. Ultimately, the changes in #29 need to be applied over this.
2026-07-19 10:27:51 +02:00
3 changed files with 22 additions and 25 deletions

View file

@ -5,8 +5,8 @@ on:
- main
jobs:
test:
name: Test
ansible-lint:
name: Verify
runs-on: docker
steps:
- uses: actions/checkout@v7
@ -14,6 +14,6 @@ jobs:
run: |
apt update
apt install -y maven
- name: Run maven verify test
- name: Run maven verify
run: |
mvn -f attribute-endpoints-provider --batch-mode --no-transfer-progress verify test
mvn -f attribute-endpoints-provider --batch-mode --no-transfer-progress verify

View file

@ -1,36 +1,35 @@
package de.ccc.hamburg.keycloak.attribute_endpoints;
import com.google.auto.service.AutoService;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.resource.RealmResourceProvider;
import org.keycloak.services.resource.RealmResourceProviderFactory;
import com.google.auto.service.AutoService;
@AutoService(RealmResourceProviderFactory.class)
public class AttributeEndpointsResourceProviderFactory implements RealmResourceProviderFactory {
static final String PROVIDER_ID = "attribute-endpoints-provider";
@Override
public RealmResourceProvider create(KeycloakSession keycloakSession) {
return new AttributeEndpointsResourceProvider(keycloakSession);
}
public RealmResourceProvider create(KeycloakSession keycloakSession) {
return new AttributeEndpointsResourceProvider(keycloakSession);
}
@Override
public void init(Config.Scope config) {
}
@Override
public void init(Config.Scope config) {
}
@Override
public void postInit(KeycloakSessionFactory keycloakSessionFactory) {
}
@Override
public void postInit(KeycloakSessionFactory keycloakSessionFactory) {
}
@Override
public void close() {
}
@Override
public void close() {
}
@Override
public String getId() {
return PROVIDER_ID;
}
@Override
public String getId() {
return PROVIDER_ID;
}
}

View file

@ -24,9 +24,7 @@ import java.util.Map;
import java.util.function.Supplier;
import java.util.stream.Stream;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;