Australian-Imaging-Service / xnat-openid-auth-plugin

GNU General Public License v3.0
3 stars 1 forks source link

xnat-openid-auth-plugin <--> Keycloak (implicit flow / authorization flow code)? #9

Open AlbertoRedolfi opened 1 year ago

AlbertoRedolfi commented 1 year ago

Dear All, I would like to bring to your attention a problem I have. We have configured XNAT v1.8.6.1 with your "xnat-openid-auth-plugin" (1.0.2 release) and we integrated/linked it through a Keycloak server. With the web-browsers we can authenticate without any problems in XNAT via Keycloak and your xnat-openid-auth-plugin, so everything works fine. Recently, we would like to allow some users to programmatically access the XNAT infromation (e.g.: projects, MRIs, etc..), but here is where the problem starts. I can get the tokens ("access_token" or "id_token") from the keyclaok clients, but then it is not clear to me if I can use one of them to connect to the XNAT server. I have tried to use Python with specific libraries (XNATpy, pyXNAT, KeycloakopenID, etc..) and also the classic curl bash command whithout success. Could you suggest me how to successfully establish this connection programmatically, or do you think it is not possibile because the "xnat-openid-auth-plugin" does not support this capability (e.g.: via implicit flow or authorization flow code)? Thanks for your help, Best, Alberto