-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS custom idp & more custom execution steps #29
base: main
Are you sure you want to change the base?
Conversation
Stream<FederatedIdentityModel> linkedAccounts = session.users().getFederatedIdentitiesStream(realm, user); | ||
|
||
linkedAccounts.forEach(identity -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stream<FederatedIdentityModel> linkedAccounts = session.users().getFederatedIdentitiesStream(realm, user); | |
linkedAccounts.forEach(identity -> { | |
session.users().getFederatedIdentitiesStream(realm, user).forEach(identity -> { |
|
||
import org.jboss.logging.Logger; | ||
|
||
public class NeonIdpCreateUserIfUnique extends AbstractIdpAuthenticator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class NeonIdpCreateUserIfUnique extends AbstractIdpAuthenticator { | |
public class NeonIdpCreateUserIfUniqueAuthenticator extends AbstractIdpAuthenticator { |
|
||
@Override | ||
public boolean configuredFor(KeycloakSession session, RealmModel realm, UserModel user) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be true
like in IdpCreateUserIfUniqueAuthenticator
?
} | ||
|
||
for (Map.Entry<String, List<String>> attr : serializedCtx.getAttributes().entrySet().stream() | ||
.sorted(Map.Entry.comparingByKey()).toList()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to sort here?
|
||
@Override | ||
public String getHelpText() { | ||
return "Create User If Unique"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's clarify here how our implementation is different from the default one.
|
||
import org.jboss.logging.Logger; | ||
|
||
public class NeonIdpEmailVerifyAuthenticator extends AbstractIdpAuthenticator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class NeonIdpEmailVerifyAuthenticator extends AbstractIdpAuthenticator { | |
public class NeonIdpEmailVerificationAuthenticator extends AbstractIdpAuthenticator { |
|
||
public class NeonIdpEmailVerifyAuthenticator extends AbstractIdpAuthenticator { | ||
public static final String VERIFIED_EMAIL = "VERIFIED_EMAIL"; | ||
private static Logger logger = Logger.getLogger(IdpEmailVerificationAuthenticator.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static Logger logger = Logger.getLogger(IdpEmailVerificationAuthenticator.class); | |
private static Logger logger = Logger.getLogger(NeonIdpEmailVerifyAuthenticator.class); |
|
||
public class NeonIdpCreateUserIfUnique extends AbstractIdpAuthenticator { | ||
|
||
private static Logger logger = Logger.getLogger(IdpEmailVerificationAuthenticator.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static Logger logger = Logger.getLogger(IdpEmailVerificationAuthenticator.class); | |
private static Logger logger = Logger.getLogger(NeonIdpCreateUserIfUnique.class); |
|
||
@Override | ||
public String getId() { | ||
return "neonmicrosoft-user-attribute-mapper"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return "neonmicrosoft-user-attribute-mapper"; | |
return "neon-microsoft-user-attribute-mapper"; |
|
||
import org.keycloak.broker.oidc.mappers.UserAttributeMapper; | ||
|
||
public class MicrosoftUserAttributeMapper extends UserAttributeMapper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since your MicrosoftIdentityProvider
extends OIDCIdentityProvider
, the builtin UserAttributeMapper might already be selectable for it, I think?
No description provided.