An alternative would be to just add the methods to KeycloakSession
----- Original Message -----
From: "Stian Thorgersen" <stian(a)redhat.com>
To: "keycloak dev" <keycloak-dev(a)lists.jboss.org>
Sent: Friday, March 13, 2015 7:05:18 AM
Subject: [keycloak-dev] Introducing KeycloakContext
Currently we pass a lot of things around. For example:
AuthenticationManager.logout(session, realm, userSession, uriInfo,
connection)
Flows.forms(session, realm, client, uriInfo)
I propose we introduce a KeycloakContext that can hold everything. It would
be injectable by RestEasy:
@Context
KeycloakContext context;
And would look something like:
public interface KeycloakContext {
KeycloakSession session();
RealmModel realm();
HttpRequest request();
UriInfo uriInfo();
ClientConnection clientConnection();
EventBuilder event();
}
Also, I think we should convert AuthenticationManager and TokenManager into
providers so they can be obtained from the session rather than passing it
around everywhere.
The above changes would be introduced after 1.2.0.Beta1 and can be done
incrementally!!
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev