KEYCLOAK-2628 protected method to IdpCreateUserIfUniqueAuthenticator after user is registered

This commit is contained in:
mposolda 2016-03-11 10:05:07 +01:00
parent 4b69cb4551
commit 25f965aa2e

View file

@ -88,7 +88,7 @@ public class IdpCreateUserIfUniqueAuthenticator extends AbstractIdpAuthenticator
federatedUser.addRequiredAction(UserModel.RequiredAction.UPDATE_PASSWORD); federatedUser.addRequiredAction(UserModel.RequiredAction.UPDATE_PASSWORD);
} }
// TODO: Event userRegisteredSuccess(context, federatedUser, serializedCtx, brokerContext);
context.setUser(federatedUser); context.setUser(federatedUser);
context.getClientSession().setNote(BROKER_REGISTERED_NEW_USER, "true"); context.getClientSession().setNote(BROKER_REGISTERED_NEW_USER, "true");
@ -140,6 +140,12 @@ public class IdpCreateUserIfUniqueAuthenticator extends AbstractIdpAuthenticator
} }
// Empty method by default. This exists, so subclass can override and add callback after new user is registered through social
protected void userRegisteredSuccess(AuthenticationFlowContext context, UserModel registeredUser, SerializedBrokeredIdentityContext serializedCtx, BrokeredIdentityContext brokerContext) {
}
@Override @Override
public boolean requiresUser() { public boolean requiresUser() {
return false; return false;