jacekkow / keycloak-protocol-cas

CAS protocol provider for Keycloak
https://issues.jboss.org/browse/KEYCLOAK-1047
Apache License 2.0
92 stars 28 forks source link

custom protocol mapper #112

Open dearaujoj opened 2 months ago

dearaujoj commented 2 months ago

Hello this is more a question than an issue. I need to develop a custom protocol mapper for the cas protocol but I want to keep it outside of this project. Can you tell me what are the classes I need to add/ implement in order to make it work, outside of the mapper itself ? keycloak docs are only refering to OIDC protocol. I tried something but it looks like my mapper is not called although I see it in the list of configured mapper and set the fields values as expected.

thanks for any input that would help

jacekkow commented 1 month ago

What exactly are you trying to use a mapper for?

I'd say mappers are very simple and the most important thing for it to work is a special file in META-INF: https://github.com/jacekkow/keycloak-protocol-cas/blob/master/src/main/resources/META-INF/services/org.keycloak.protocol.ProtocolMapper

dearaujoj commented 1 week ago

Hi, Sorry for the late reply I haven't seen yours. in the project I'm working on, I need to decrypt a value coming from a LDAP federation in order to add the decrypted value in cas attributes response. I created a single project for this mapper which was seen by keycloak but the mapper was never triggered. So I ended up modifying the user attribute mapper to add a key field to do the decrypt process. obviously I would like to move the mapper to its own project but I didn't find how to make it work till now.

I'm still looking for a documentation for such need but fail to find one.

I'm going to have a look at the META-INF.

Thanks