Skip to content

Commit

Permalink
update with support for saml mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
patkub committed Jul 21, 2024
1 parent e77358f commit 7658110
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ NPM: https://www.npmjs.com/package/auth0-rule-as-action
- `callback` method with success and error
- ID and Access token claims
- `context.idToken["claim"] = "value"` becomes `api.idToken.setCustomClaim(claim, value)`
- `context.accessToken["claim"] = "value"` becomes `api.accessToken.setCustomClaim(claim, value)`
- SAML configuration mappings
- `context.samlConfiguration.mappings["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"] = "upn";` becomes `api.samlResponse.setAttribute("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", "upn");`

## Example

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth0-rule-as-action",
"version": "0.1.22",
"version": "0.1.23",
"description": "Run an Auth0 Rule as an Action",
"main": "dist/RuleToAction.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/mapEventToContext.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function MapEventToContext(event) {
const context = {
accessToken: {},
idToken: {},
samlConfiguration: {},
samlConfiguration: {
mappings: {}
},
multifactor: {},
sessionID: null
};
Expand Down

0 comments on commit 7658110

Please sign in to comment.