Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
moqui
/
moqui-keycloak
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b355489b
authored
2023-03-15 18:52:05 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
No longer hard-code the realm name in the service.
1 parent
024ec6a4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
service/keycloak/KeycloakServices.groovy
src/main/groovy/org/moqui/keycloak/KeycloakToolFactory.groovy
service/keycloak/KeycloakServices.groovy
View file @
b355489
...
...
@@ -272,10 +272,11 @@ Map<String, Object> pushKeycloakUser() {
Map
<
String
,
Object
>
getKeycloakUsers
()
{
String
keycloakClientId
=
'moqui'
Keycloak
keycloak
=
ec
.
getTool
(
'Keycloak'
,
Keycloak
.
class
)
KeycloakToolFactory
keycloakToolFactory
=
ec
.
getFactory
().
getToolFactory
(
'Keycloak'
)
Keycloak
keycloak
=
keycloakToolFactory
.
getInstance
()
try
{
RealmResource
realm
=
keycloak
.
realm
(
'master'
)
RealmResource
realm
=
keycloak
.
realm
(
keycloakToolFactory
.
getRealmName
()
)
/*
ServerInfoResource serverInfo = keycloak.serverInfo()
logger.info('keycloak serverInfo: ' + keycloakToJson(serverInfo.getInfo()))
...
...
src/main/groovy/org/moqui/keycloak/KeycloakToolFactory.groovy
View file @
b355489
...
...
@@ -70,6 +70,10 @@ class KeycloakToolFactory implements ToolFactory<Keycloak> {
return
keycloakBuilder
.
build
()
}
String
getRealmName
()
{
return
(
String
)
System
.
getProperty
(
"moqui_keycloak_realm"
)
}
@Override
void
destroy
()
{
}
...
...
Please
register
or
sign in
to post a comment