trials, but not yet finished
This commit is contained in:
16
.classpath
16
.classpath
@ -6,24 +6,26 @@
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" output="bin/test" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="test"/>
|
||||
<attribute name="gradle_used_by_scope" value="test"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
@ -1,13 +1,2 @@
|
||||
arguments=
|
||||
auto.sync=false
|
||||
build.scans.enabled=false
|
||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
||||
connection.project.dir=
|
||||
eclipse.preferences.version=1
|
||||
gradle.user.home=
|
||||
java.home=
|
||||
jvm.arguments=
|
||||
offline.mode=false
|
||||
override.workspace.settings=false
|
||||
show.console.view=false
|
||||
show.executions.view=false
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
<wb-module deploy-name="camporganizer2">
|
||||
<wb-module deploy-name="CampOrganizer2">
|
||||
|
||||
<property name="context-root" value="camporganizer2"/>
|
||||
<property name="context-root" value="CampOrganizer2"/>
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
|
||||
|
||||
|
@ -17,7 +17,6 @@ import org.keycloak.representations.idm.UserRepresentation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author henkej
|
||||
@ -81,19 +80,12 @@ public class KeycloakRepository {
|
||||
}
|
||||
|
||||
public Client getClient() {
|
||||
return new ResteasyClientBuilderImpl()
|
||||
.connectionPoolSize(10)
|
||||
.build();
|
||||
return new ResteasyClientBuilderImpl().connectionPoolSize(10).build();
|
||||
}
|
||||
|
||||
public KeycloakBuilder getKeycloak() {
|
||||
return KeycloakBuilder.builder()
|
||||
.serverUrl(keycloakUrl)
|
||||
.realm(keycloakRealm)
|
||||
.grantType(OAuth2Constants.PASSWORD)
|
||||
.username(keycloakAdminName)
|
||||
.password(keycloakAdminPassword)
|
||||
.clientId(keycloakClientId)
|
||||
return KeycloakBuilder.builder().serverUrl(keycloakUrl).realm(keycloakRealm).grantType(OAuth2Constants.PASSWORD)
|
||||
.username(keycloakAdminName).password(keycloakAdminPassword).clientId(keycloakClientId)
|
||||
.resteasyClient(getClient());
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class RegistrationService {
|
||||
public Boolean register(RegistrationBean bean) {
|
||||
Boolean result = gateway.register(bean);
|
||||
if (result && bean.getRegisterInKeycloak()) {
|
||||
keycloak.register(bean.getLogin(), bean.getPassword());
|
||||
keycloak.register(bean.getLogin(), bean.getPassword(), bean.getEmail());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
*
|
||||
|
Reference in New Issue
Block a user