Skip to content

Commit

Permalink
add encoded JWT token to CHEFS context
Browse files Browse the repository at this point in the history
  • Loading branch information
bcvesalink committed Apr 24, 2024
1 parent e913ec9 commit 80bd798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/frontend/src/components/designer/FormViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default {
evalContext: {
token: this.tokenParsed,
user: this.user,
encoded_token: this.keycloak.token,
},
};
},
Expand Down
1 change: 1 addition & 0 deletions components/src/overrides/editform/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function logicVariablesTable(additional = '') {

const customEval =
'<tr><th>token</th><td>The decoded JWT token for the authenticated user.</td></tr>' +
'<tr><th>encoded_token</th><td>The encoded JWT token for the authenticated user.</td></tr>' +
'<tr><th>user</th><td>The currently logged in user</td></tr>';
return originalLogicVariablesTable(additional + customEval);
}
Expand Down

0 comments on commit 80bd798

Please sign in to comment.