KEYCLOAK-1355 Make admin requests to have RealmModel and ClientModel available in KeycloakContext
This commit is contained in:
parent
5d4869f915
commit
ce6576ce84
3 changed files with 7 additions and 3 deletions
|
@ -118,6 +118,9 @@ public class ClientsResource {
|
|||
if (clientModel == null) {
|
||||
throw new NotFoundException("Could not find client: " + name);
|
||||
}
|
||||
|
||||
session.getContext().setClient(clientModel);
|
||||
|
||||
ClientResource clientResource = new ClientResource(realm, auth, clientModel, session, adminEvent);
|
||||
ResteasyProviderFactory.getInstance().injectProperties(clientResource);
|
||||
return clientResource;
|
||||
|
|
|
@ -438,8 +438,8 @@ public class RealmAdminResource {
|
|||
/**
|
||||
* Query admin events. Returns all admin events, or will query based on URL query parameters listed here
|
||||
*
|
||||
* @param client app or oauth client name
|
||||
* @param operationTypes operation type
|
||||
* @param authRealm
|
||||
* @param authClient
|
||||
* @param authUser user id
|
||||
* @param authIpAddress
|
||||
* @param resourcePath
|
||||
|
|
|
@ -227,7 +227,8 @@ public class RealmsAdminResource {
|
|||
}
|
||||
|
||||
AdminEventBuilder adminEvent = new AdminEventBuilder(realm, auth, session, clientConnection);
|
||||
|
||||
session.getContext().setRealm(realm);
|
||||
|
||||
RealmAdminResource adminResource = new RealmAdminResource(realmAuth, realm, tokenManager, adminEvent);
|
||||
ResteasyProviderFactory.getInstance().injectProperties(adminResource);
|
||||
//resourceContext.initResource(adminResource);
|
||||
|
|
Loading…
Reference in a new issue