-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keycloak does not support ES256 signature with OIDC provider, so we need to verify by ourselves. AgentConnect publishes the keys on a JWKS URL but for the RSA Key, there is not usage, so we cannot directly use the lkeycloak way and need to internalise it to do some null checking. Signed-off-by: Cédric Couralet <[email protected]>
- Loading branch information
Showing
22 changed files
with
1,556 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 15 additions & 9 deletions
24
src/main/java/fr/insee/keycloak/mappers/FranceConnectUserAttributeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package fr.insee.keycloak.mappers; | ||
|
||
import fr.insee.keycloak.provider.AgentConnectIdentityProviderFactory; | ||
import fr.insee.keycloak.provider.FranceConnectIdentityProviderFactory; | ||
import org.keycloak.broker.oidc.mappers.UserAttributeMapper; | ||
|
||
public class FranceConnectUserAttributeMapper extends UserAttributeMapper { | ||
|
||
private static final String MAPPER_NAME = "franceconnect-user-attribute-mapper"; | ||
private static final String MAPPER_NAME = "franceconnect-user-attribute-mapper"; | ||
|
||
@Override | ||
public String[] getCompatibleProviders() { | ||
return FranceConnectIdentityProviderFactory.COMPATIBLE_PROVIDER; | ||
} | ||
public static final String[] COMPATIBLE_PROVIDERS = | ||
new String[] { | ||
AgentConnectIdentityProviderFactory.AC_PROVIDER_ID, | ||
FranceConnectIdentityProviderFactory.FC_PROVIDER_ID | ||
}; | ||
|
||
@Override | ||
public String getId() { | ||
return MAPPER_NAME; | ||
} | ||
@Override | ||
public String[] getCompatibleProviders() { | ||
return COMPATIBLE_PROVIDERS; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return MAPPER_NAME; | ||
} | ||
} |
24 changes: 15 additions & 9 deletions
24
src/main/java/fr/insee/keycloak/mappers/FranceConnectUsernameTemplateMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package fr.insee.keycloak.mappers; | ||
|
||
import fr.insee.keycloak.provider.AgentConnectIdentityProviderFactory; | ||
import fr.insee.keycloak.provider.FranceConnectIdentityProviderFactory; | ||
import org.keycloak.broker.oidc.mappers.UsernameTemplateMapper; | ||
|
||
public class FranceConnectUsernameTemplateMapper extends UsernameTemplateMapper { | ||
|
||
private static final String MAPPER_NAME = "franceconnect-username-template-mapper"; | ||
private static final String MAPPER_NAME = "franceconnect-username-template-mapper"; | ||
|
||
@Override | ||
public String[] getCompatibleProviders() { | ||
return FranceConnectIdentityProviderFactory.COMPATIBLE_PROVIDER; | ||
} | ||
public static final String[] COMPATIBLE_PROVIDERS = | ||
new String[] { | ||
AgentConnectIdentityProviderFactory.AC_PROVIDER_ID, | ||
FranceConnectIdentityProviderFactory.FC_PROVIDER_ID | ||
}; | ||
|
||
@Override | ||
public String getId() { | ||
return MAPPER_NAME; | ||
} | ||
@Override | ||
public String[] getCompatibleProviders() { | ||
return COMPATIBLE_PROVIDERS; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return MAPPER_NAME; | ||
} | ||
} |
Oops, something went wrong.