feat: add saml custom attribute action and translations (#6341)

* feat: add saml custom attribute action and translations

* chore: update saml dependency

* fix: apply suggestions from code review

Co-authored-by: Livio Spring <livio.a@gmail.com>

* fix: custom attribute action with variadic parameter

* docs: add customize saml response docs

* docs: update docs/docs/apis/actions/customize-samlresponse.md

Co-authored-by: Livio Spring <livio.a@gmail.com>

* docs: update docs/docs/apis/actions/customize-samlresponse.md

Co-authored-by: Livio Spring <livio.a@gmail.com>

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Stefan Benz
2023-08-15 17:04:45 +02:00
committed by GitHub
parent d83681a928
commit 26b28ed2af
20 changed files with 243 additions and 26 deletions

View File

@@ -0,0 +1,28 @@
---
title: Complement SAMLResponse
---
This flow is executed before the return of the SAMLResponse.
## Pre SAMLResponse creation
This trigger is called before attributes are set in the SAMLResponse.
### Parameters of Pre SAMLResponse creation
- `ctx`
The first parameter contains the following fields:
- `v1`
- `getUser()` [*User*](./objects#user)
- `user`
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
- `grants` [*UserGrantList*](./objects#user-grant-list)
- `api`
The second parameter contains the following fields:
- `v1`
- `attributes`
- `setCustomAttribute(string, string, ...string)`
Sets any value as attribute in addition to the default attributes, if the key is not already present. The parameters represent the key, nameFormat and the attributeValue(s).
- `user`
- `setMetadata(string, Any)`
Key of the metadata and any value

View File

@@ -566,6 +566,7 @@ module.exports = {
"apis/actions/internal-authentication",
"apis/actions/external-authentication",
"apis/actions/complement-token",
"apis/actions/customize-samlresponse",
"apis/actions/objects",
]
},