ices-taf / doc

Community documentation for the TAF project
http://taf.ices.dk
11 stars 4 forks source link

icesConnect - ices_token() does not update claims #282

Closed colinpmillar closed 2 years ago

colinpmillar commented 3 years ago

https://github.com/ices-tools-prod/icesConnect

ices_token() function fetches a token from the auth get token api but does not fetch the new claims. Currently the user has to login to taf.ices.dk/github in order for thier claims to be updated...

colinpmillar commented 3 years ago

Fixed by updating sharepoint group claims upon token request: https://dev.azure.com/ices-devops/DataCentre/_git/ICES.UserStore/commit/0e0aa92c6dde11e0a2b4b59ab3138425983ef0c3?refName=refs%2Fheads%2Fmain

and adding a refresh argument to r ices_token(): https://github.com/ices-tools-prod/icesConnect/commit/399aed463107def2b553d8c2854a0fe605ab0224

colinpmillar commented 3 years ago

to test, run:

library(icesConnect)

jwt <- ices_token(refresh = TRUE)
claims <- decode_token(jwt)

grep("SP_AD", names(claims), value = TRUE)

And check that we have both been added to the ADGBASS group