diff --git a/src/main/java/vercel/VercelMPIdentityProvider.java b/src/main/java/vercel/VercelMPIdentityProvider.java index 1afedc0..dfafb3c 100755 --- a/src/main/java/vercel/VercelMPIdentityProvider.java +++ b/src/main/java/vercel/VercelMPIdentityProvider.java @@ -2,7 +2,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.ws.rs.GET; -import jakarta.ws.rs.POST; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; @@ -193,8 +192,6 @@ public Endpoint(RealmModel realm, AuthenticationCallback callback, EventBuilder this.provider = provider; } - // Override parent's authResponse and change annotation to @POST to be able to use @GET with another list of parameters - // and we need to initialize `authSession` properly. @GET @Override public Response authResponse(@QueryParam(AbstractOAuth2IdentityProvider.OAUTH2_PARAMETER_STATE) String state, diff --git a/src/main/java/vercel/VercelMPUserAttributeMapper.java b/src/main/java/vercel/VercelMPUserAttributeMapper.java new file mode 100644 index 0000000..4f4c8c1 --- /dev/null +++ b/src/main/java/vercel/VercelMPUserAttributeMapper.java @@ -0,0 +1,23 @@ +package vercel; + +import org.keycloak.broker.oidc.mappers.UserAttributeMapper; + +/** + * User attribute mapper. + * + */ +public class VercelMPUserAttributeMapper extends UserAttributeMapper { + + private static final String[] cp = new String[] { VercelMPIdentityProviderFactory.PROVIDER_ID }; + + @Override + public String[] getCompatibleProviders() { + return cp; + } + + @Override + public String getId() { + return "vercelmp-user-attribute-mapper"; + } + +} diff --git a/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper b/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper new file mode 100755 index 0000000..ac6d232 --- /dev/null +++ b/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper @@ -0,0 +1 @@ +vercel.VercelMPUserAttributeMapper