I am currently using this in my XData Server and it works perfectly. I am setting a claim which is the user's GUID as follows.
JWT:=TJWT.Create(TJWTClaims); JWT.Claims.Issuer:='EAP Cloud'; JWT.Claims.SetClaimOfType<TGUID>('UserGUID',UserGUID); JWT.Claims.Expiration:=Now+1;
I now need to access this UserGUID n a TAureliusModelEvents.OnUpdated event. I have tried using:
User:=TXDataOperationContext.Current.Request.User; if User.Claims.Exists('UserGUID') then
but it is not found. How can I do this?