Accessing OIDC-ID-token

Hello everyone, we are using OpenID Connect for authentication as described here: https://www.shinyproxy.io/documentation/configuration/#openid-connect-oidc. After successful authentication, the container contains the following variables with the expected information: SHINYPROXY_USERNAME, SHINYPROXY_USERGROUPS, SHINYPROXY_OIDC_ACCESS_TOKEN. Is it also possible to access the id token in addition to the access token? In the documentation, it is mentioned several times that the id token is used to extract the username. So I assume that is available, but is it also accessable?

Hi

You can access the ID token using “SPeL”, for a detailed explanation see https://shinyproxy.io/documentation/spel/

For example, you can use:

 - id: 01_hello
   container-image: openanalytics/shinyproxy-demo
   container-env:
       SHINYPROXY_ID_TOKEN: "#{oidcUser.idToken.tokenValue}"

Wow, thank you very much!

1 Like

@tdekoninck
Hey one question… which atributes can I get from oidcUser.idToken???

So far I see we can get tokenValue and email… i am wondering if I can get user_metadata somehow with this approach