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
d752e323
authored
2023-05-10 08:53:45 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove some stale code.
1 parent
3ccfe521
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
111 deletions
service/keycloak/HookServices.groovy
service/keycloak/KeycloakServices.groovy
service/keycloak/KeycloakServices.xml
service/keycloak/HookServices.groovy
View file @
d752e32
...
...
@@ -95,94 +95,6 @@ class HookSynchronization implements Synchronization {
}
}
/*
class HookXAResource implements XAResource {
private static class EntityPk {
protected String entityName;
protected Map<String, Object> pk;
protected EntityPk(EntityValue entity) {
this.entityName = entity.getEntityName()
this.pk = entity.getPrimaryKeys()
}
public boolean equals(Object other) {
if (!(object instanceof EntityPk)) {
return false
}
EntityPk that = (EntityPk) other
return entityName.equals(that.entityName) && pk.equals(that.pk)
}
public int hashCode() {
return entityName.hashCode ^ pk.hashCode()
}
}
private Map<Xid, Set<EntityPk>> modifiedValues = new HashMap<>()
private int timeout = 60
@Override
public void commit(Xid xid, boolean onePhase) {
}
@Override
public void end(Xid xid, int flags) {
if (flags & TMFAIL) {
} else if (flags & TMSUSPEND) {
} else if (flags & TMSUCCESS) {
}
}
@Override
public void forget(Xid xid) {
modifiedValues.remove(xid)
}
@Override
public int getTransactionTimeout() {
return timeout
}
@Override
public boolean isSameRM(XAResource xar) {
return getClass().equals(xar.getClass())
}
@Override
public int prepare(Xid xid) {
if (!keycloak.connected()) {
throw new XAException(XAException.XAERR_RMFAIL)
}
}
@Override
public Xid[] recover(int flag) {
}
@Override
public void rollback(Xid xid) {
}
@Override
public boolean setTransactionTimeout(int timeout) {
this.timeout = timeout
}
@Override
public void start(Xid xid, int flags) {
}
}
*/
HookSynchronization
getHookSync
()
{
HookSynchronization
hookSync
=
ec
.
transaction
.
getActiveSynchronization
(
getClass
().
getName
())
if
(
hookSync
==
null
)
{
...
...
service/keycloak/KeycloakServices.groovy
View file @
d752e32
...
...
@@ -458,15 +458,4 @@ void updateUser(String keycloakUserId, String userId) {
userRep
.
setEnabled
(
"N"
.
equals
(
userAccount
.
disabled
))
userResource
.
update
(
userRep
)
Map
<
String
,
Object
>
foo
=
userResource
.
impersonate
()
logger
.
info
(
"impersonate: foo=${foo}"
)
}
Map
<
String
,
Object
>
getKeycloakUsers
()
{
try
{
updateUser
(
'c6f99571-a79d-4267-b76e-a02a6847c8c9'
,
'100000'
)
}
finally
{
cleanupKeycloak
()
}
}
...
...
service/keycloak/KeycloakServices.xml
View file @
d752e32
...
...
@@ -53,16 +53,4 @@ along with this software (see the LICENSE.md file). If not, see
<parameter
name=
"partyClassificationId"
type=
"String"
required=
"true"
/>
</in-parameters>
</service>
<service
verb=
"get"
noun=
"KeycloakUsers"
type=
"script"
location=
"component://moqui-keycloak/service/keycloak/KeycloakServices.groovy"
method=
"getKeycloakUsers"
>
</service>
<!--
<service verb="update" noun="PasswordInternal" type="script" location="component://moqui-keycloak/service/keycloak/KeycloakServices.groovy" method="updatePasswordInternal" authenticate="anonymous-all">
<in-parameters>
<parameter name="userId" type="String" required="true"/>
<parameter name="newPassword" type="String" required="true"/>
</in-parameters>
</service>
-->
</services>
...
...
Please
register
or
sign in
to post a comment