Repository navigation
Replies: 1 comment 2 replies
|
Keycloak provides no native common interface out-of-the-box. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am currently working on centralizing some logic that, in one case, uses the server-spi-private/src/main/java/org/keycloak/authentication/RequiredActionContext.java interface, and in the other, uses the server-spi-private/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java interface.
I tried to look for common ground between the two interfaces: I couldn't find any. RequiredActionContext doesn't extend any interfaces, and AuthenticationFlowContext extends AbstractAuthenticationFlowContext, which in turn doesn't extend anything.
I realize that both of those interfaces have a lot of similar methods. Even this forum makes the same observation than I did: https://forum.keycloak.org/t/required-action-getting-authenticationflowcontext/12077/2
In order to maintain clean code, I would like an interface that relates the two together: they have a lot of similar methods that could be used for my utility methods.
For example, in my case, I am centralizing the use of these methods:
UserModel getUser();
LoginFormsProvider form();
void challenge(Response resp);
AuthenticationSessionModel getAuthenticationSession();
KeycloakSession getSession();
Could we create an interface that relates the two?
All reactions