mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 03:52:14 +00:00
docs: introduce versioned docs and migrate to fuma (#11166)
## Todos for release - [x] Configure Env in docs project on vercel - [x] Configure Root Path in the docs project on vercel - [ ] Remove old CSP https://github.com/zitadel/website/pull/1592 ## What we did This pull request migrates the project documentation from the old `docs/` directory to the new `apps/docs/` directory, introduces a new documentation system built with Next.js and Fumadocs, and updates all relevant references, configuration files, and documentation to reflect this change. It also adds new configuration and ignore files for the new documentation app, updates CI and linting to exclude the new docs from certain checks, and revises the contributing guidelines accordingly. **Documentation System Migration and New Docs App** * Migrated all documentation from `docs/` to `apps/docs/`, and updated all references in `README.md`, `CONTRIBUTING.md`, and other files to point to the new location. [[1]](diffhunk://#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055L585-L640) [[2]](diffhunk://#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055L660-R607) [[3]](diffhunk://#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055L740-R687) [[4]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L2-R3) [[5]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L30-R30) * Added a new Next.js/Fumadocs-based documentation app under `apps/docs/`, including core app files, layouts, routing, search API, and a comprehensive `README.md` with development and contribution instructions. [[1]](diffhunk://#diff-5a1b07344a2c1b4d3f37b23ff1388b62cd9f57dea3c1cd23d8a0412b7602b132R1-R74) [[2]](diffhunk://#diff-462b9ad1eabbb7d1c29bb9c36e4931eb180fd7190900e6d2babf8f4d66ad1c28R1-R39) [[3]](diffhunk://#diff-e16ae25660ded787b10ac35dea96d5ecaacf895dae0afc8a9bd4382dc79a8c87R1-R7) [apps/docs/app/[[...slug]]/layout.tsxR1-R81](diffhunk://#diff-59e08acde4e805b7aeccef1dcf98f1d71dfc550777e6b9402085cee0e9fa4e0aR1-R81), [apps/docs/app/[[...slug]]/page.tsxR1-R79](diffhunk://#diff-e5df3f80d0fa01e12d63d81f29c57a9d14e846c78fd3beabb2ef768e38fd9580R1-R79), [[4]](diffhunk://#diff-389b34918e040cacaa87cd7201ffa462cc2b0b716736f537e3d3c660ac69353bR1-R7) [[5]](diffhunk://#diff-d3b03416d1c457b19f1c27b26f2db741412df841b875c26ccadc36e4522247f4R1-R29) [[6]](diffhunk://#diff-c8fb8339570a5305809be7c618e14705fd86390dc278e6ce8ba224a7bc8b0c3cR1-R25) **Configuration and Tooling Updates** * Updated `.github/workflows/codeql.yml`, `.golangci.yaml`, and `.github/dependabot.yml` to properly handle the new docs app: excluded `apps/docs` from certain checks, added npm dependency updates for the docs app, and excluded generated content. [[1]](diffhunk://#diff-12783128521e452af0cfac94b99b8d250413c516ec71fe6d97dbea666ff7ba27L8-R14) [[2]](diffhunk://#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5R5-R6) [[3]](diffhunk://#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5R126-R129) [[4]](diffhunk://#diff-dd4fbda47e51f1e35defb9275a9cd9c212ecde0b870cba89ddaaae65c5f3cd28R89-R106) * Updated `.devcontainer/devcontainer.json` to use the latest Go 1.25.3 version for consistency. **Licensing and Miscellaneous** * Added `apps/docs/` to the list of licensed directories in `LICENSING.md`. These changes ensure the documentation is now maintained in a modern, scalable system and all project tooling is updated to support the new structure. --------- Co-authored-by: Federico Coppede <[email protected]>
This commit is contained in:
co-authored by
Federico Coppede
parent
7b6395c348
commit
d8ea041c56
@@ -0,0 +1,347 @@
|
||||
---
|
||||
title: Code examples
|
||||
---
|
||||
|
||||
Actions are a powerful tool to extend ZITADEL and you might wonder what use cases actions can be used for.
|
||||
|
||||
This page provides a non-exhaustive list of possibilities which is provided by [examples](https://github.com/zitadel/actions/tree/main/examples). If a use case is missing feel free to contribute an issue or pull request to the repository, thanks in advance 🤗.
|
||||
|
||||
## Customize OIDC response
|
||||
|
||||
Append claims returned on OIDC requests.
|
||||
|
||||
### Triggers
|
||||
|
||||
- Complement token
|
||||
- [Pre Userinfo creation](./complement-token#pre-userinfo-creation-id-token-userinfo-introspection-endpoint)
|
||||
- [Pre access token creation](./complement-token#pre-access-token-creation)
|
||||
|
||||
### Set hardcoded claim
|
||||
|
||||
Extend the claims by a hardcoded value.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/add_claim.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Set dynamic claim from user metadata
|
||||
|
||||
Extend the claims by dynamically read metadata from a user and sets the picture-claim if idpPicture-metadata value is present.
|
||||
|
||||
<details open="">
|
||||
<summary>{props.summary ? props.summary : 'Code example'}</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/add_picture_claim_from_idp_metadata.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Set dynamic claim from organization metadata
|
||||
|
||||
Extend the claims by dynamically read metadata from an organization and sets the present metadata.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/org_metadata_claim.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Custom role mapping in claims
|
||||
|
||||
Some products require specific role mapping from ZITADEL, no worries we got you covered 😉
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/custom_roles.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Custom role mapping including org metadata in claims
|
||||
|
||||
There's even a possibility to use the metadata of organizations the user is granted to
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/custom_roles_org_metadata.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Customize SAML response
|
||||
|
||||
Append attributes returned on SAML requests.
|
||||
|
||||
### Triggers
|
||||
|
||||
- Complement SAMLResponse
|
||||
- [Pre SAMLResponse creation](./customize-samlresponse#pre-saml-response-creation)
|
||||
|
||||
### Custom role mapping in attributes
|
||||
|
||||
Some products require specific role mapping from ZITADEL, no worries we got you covered 😉
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/set_custom_attribute.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Set dynamic attribute from organization metadata
|
||||
|
||||
Extend the attributes by dynamically read metadata from an organization and sets the present metadata.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/org_metadata_attribute.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Manipulate user
|
||||
|
||||
You can automate manual tasks like setting default grants during user creation.
|
||||
|
||||
### Set email always verified
|
||||
|
||||
Useful if you trust the provided information or don't want the users to verify their e-mail addresses.
|
||||
|
||||
#### Triggers
|
||||
|
||||
- Internal Authentication
|
||||
- [Pre Creation](/apis/actions/internal-authentication#pre-creation)
|
||||
- External Authentication
|
||||
- [Pre Creation](/apis/actions/external-authentication#pre-creation)
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/verify_email.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Add grants to users
|
||||
|
||||
Allows you to add default user grants to a user after it was created or federated.
|
||||
|
||||
#### Triggers
|
||||
|
||||
- Internal Authentication
|
||||
- [Post Creation](/apis/actions/internal-authentication#post-creation)
|
||||
- External Authentication
|
||||
- [Post Creation](/apis/actions/external-authentication#post-creation)
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/add_user_grant.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Add metadata to users
|
||||
|
||||
Adding metadata to users allows you to set default metadata on users.
|
||||
|
||||
#### Triggers
|
||||
|
||||
- Internal Authentication
|
||||
- [Pre Creation](/apis/actions/internal-authentication#pre-creation)
|
||||
- [Post Authentication](/apis/actions/internal-authentication#post-authentication)
|
||||
- External Authentication
|
||||
- [Pre Creation](/apis/actions/internal-authentication#pre-creation)
|
||||
- [Post Authentication](/apis/actions/internal-authentication#post-authentication)
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/add_metadata.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Use provided fields of identity providers
|
||||
|
||||
If you want to ensure that the data of a user are always up-to-date, you can automatically update user fields during authentication and save time of your customers and your team.
|
||||
|
||||
### Trigger
|
||||
|
||||
- External Authentication
|
||||
- [Post Authentication](./external-authentication#post-authentication)
|
||||
|
||||
### Fields provided by Okta as OIDC IdP
|
||||
|
||||
If you use [Okta as an identity provider](/guides/integrate/identity-providers/okta-oidc) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/okta_identity_provider.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Fields provided by Gitlab
|
||||
|
||||
If you use [Gitlab as an identity provider](/guides/integrate/identity-providers/gitlab) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/gitlab_identity_provider.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Fields provided by Github
|
||||
|
||||
If you use [Github as an identity provider](/guides/integrate/identity-providers/github) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/github_identity_provider.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Claims provided by a generic OIDC identity provider
|
||||
|
||||
If you use a [generic OIDC identity provider](/guides/integrate/identity-providers/migrate#migrate-generic-oidc-provider) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/set_idp_picture_metadata.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Attributes provided by Okta as SAML IDP
|
||||
|
||||
If you use [Okta as an identity provider](/guides/integrate/identity-providers/okta_saml#add-attribute-statements) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/okta_saml_prefil_register_form.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Attributes provided by Microsoft Entra as SAML IDP
|
||||
|
||||
If you use [Microsoft Entra as SAML identity provider](/guides/integrate/identity-providers/azure-ad-saml) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/entra_id_saml_prefil_register_form.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Attributes provided by a generic SAML identity provider
|
||||
|
||||
If you use a [SAML identity provider like mocksaml](/guides/integrate/identity-providers/mocksaml) you can improve the onboarding experience of new users by prefilling some basic information during authentication.
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/post_auth_saml.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Context aware execution
|
||||
|
||||
Based on the context the execution path of an action can change. ZITADEL allows complex execution paths of course. 😎
|
||||
|
||||
### Based on auth request information
|
||||
|
||||
Execution paths might change based on the application initiating the authentication.
|
||||
|
||||
#### Triggers
|
||||
|
||||
- Internal Authentication
|
||||
- [Pre Creation](/apis/actions/internal-authentication#pre-creation)
|
||||
- [Post Creation](/apis/actions/internal-authentication#post-creation)
|
||||
- [Post Authentication](/apis/actions/internal-authentication#post-authentication)
|
||||
- External Authentication
|
||||
- [Pre Creation](/apis/actions/external-authentication#pre-creation)
|
||||
- [Post Creation](/apis/actions/external-authentication#post-creation)
|
||||
- [Post Authentication](/apis/actions/external-authentication#post-authentication)
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/execute_action_on_specific_app.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
This example uses [zitadel's log module](/apis/actions/modules#log)
|
||||
|
||||
### Check authentication error
|
||||
|
||||
Your action can also check for errors during the login process.
|
||||
|
||||
#### Triggers
|
||||
|
||||
- Internal Authentication
|
||||
- [Post Authentication](/apis/actions/internal-authentication#post-authentication)
|
||||
- External Authentication
|
||||
- [Post Authentication](/apis/actions/external-authentication#post-authentication)
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/post_auth_log.js
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
This example uses [zitadel's log module](/apis/actions/modules#log)
|
||||
|
||||
### Throw an error
|
||||
|
||||
Allows you to limit the user interaction. The error thrown will be shown to the user if the action is not [allowed to fail](/concepts/features/actions#how-it-works).
|
||||
|
||||
<details open="">
|
||||
<summary>Code example</summary>
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/throw_error.js
|
||||
```
|
||||
</details>
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: Complement Token Flow
|
||||
---
|
||||
|
||||
This flow is executed during the creation of tokens and token introspection.
|
||||
|
||||
The flow is represented by the following Ids in the API: `2`
|
||||
|
||||
## Pre Userinfo creation (id_token / userinfo / introspection endpoint)
|
||||
|
||||
This trigger is called before userinfo are set in the id_token or userinfo and introspection endpoint response.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `4`
|
||||
|
||||
### Parameters of Pre Userinfo creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields:
|
||||
- `v1`
|
||||
- `claims` [*Claims*](./objects#claims)
|
||||
- `getUser()` [*User*](./objects#user)
|
||||
- `user`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `grants` [*UserGrantList*](./objects#user-grant-list)
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `api`
|
||||
The second parameter contains the following fields:
|
||||
- `v1`
|
||||
- `userinfo`
|
||||
This function is deprecated, please use `api.v1.claims`
|
||||
- `setClaim(string, Any)`
|
||||
Sets any value if the key is not already present. If it's already present there is a message added to `urn:zitadel:iam:action:${action.name}:log`
|
||||
Note that keys with prefix `urn:zitadel:iam` will be ignored.
|
||||
- `claims`
|
||||
- `setClaim(string, Any)`
|
||||
Sets any value if the key is not already present. If it's already present there is a message added to `urn:zitadel:iam:action:${action.name}:log`
|
||||
Note that keys with prefix `urn:zitadel:iam` will be ignored.
|
||||
- `user`
|
||||
- `setMetadata(string, Any)`
|
||||
Key of the metadata and any value
|
||||
|
||||
## Pre access token creation
|
||||
|
||||
This trigger is called before the claims are set in the access token and the token type is `jwt`.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `5`
|
||||
|
||||
### Parameters of Pre access token creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields:
|
||||
- `v1`
|
||||
- `claims` [*Claims*](./objects#claims)
|
||||
- `getUser()` [*User*](./objects#user)
|
||||
- `user`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `grants` [*UserGrantList*](./objects#user-grant-list)
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `api`
|
||||
The second parameter contains the following fields:
|
||||
- `v1`
|
||||
- `claims`
|
||||
- `setClaim(string, Any)`
|
||||
Sets any value if the key is not already present. If it's already present there is a message added to `urn:zitadel:iam:action:${action.name}:log`
|
||||
Note that keys with prefix `urn:zitadel:iam` will be ignored.
|
||||
- `appendLogIntoClaims(string)`
|
||||
Appends the entry into the claim `urn:zitadel:action:{action.name}:log` the value of the claim is an Array of *string*
|
||||
- `user`
|
||||
- `setMetadata(string, Any)`
|
||||
Key of the metadata and any value
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Complement SAMLResponse
|
||||
---
|
||||
|
||||
This flow is executed before the return of the SAML Response.
|
||||
|
||||
The flow is represented by the following Ids in the API: `4`
|
||||
|
||||
## Pre SAMLResponse creation
|
||||
|
||||
This trigger is called before attributes are set in the SAMLResponse.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `6`.
|
||||
|
||||
### 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)
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `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
|
||||
@@ -0,0 +1,137 @@
|
||||
---
|
||||
title: External Authentication Flow
|
||||
---
|
||||
|
||||
This flow is executed if the user logs in using an [identity provider](/guides/integrate/identity-providers/introduction).
|
||||
|
||||
The flow is represented by the following Ids in the API: `FLOW_TYPE_EXTERNAL_AUTHENTICATION` and `1`
|
||||
|
||||
## Post Authentication
|
||||
|
||||
A user has authenticated externally. ZITADEL retrieved and mapped the external information.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_POST_AUTHENTICATION` or `1`.
|
||||
|
||||
### Parameters of Post Authentication Action
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `accessToken` *string*
|
||||
The access token returned by the identity provider. This can be an opaque token or a JWT
|
||||
- `refreshToken` *string*
|
||||
The refresh token returned by the identity provider if there is one. This is most likely to be an opaque token.
|
||||
- `claimsJSON()` [*idTokenClaims*](../openidoauth/claims)
|
||||
Returns all claims of the id token
|
||||
- `getClaim(key)` *Any*
|
||||
Returns the requested [id token claim](../openidoauth/claims)
|
||||
- `idToken` *string*
|
||||
The id token provided by the identity provider.
|
||||
- `v1`
|
||||
- `externalUser` [*externalUser*](./objects#external-user)
|
||||
- `authError` *string*
|
||||
This is a verification errors string representation. If the verification succeeds, this is "none"
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `providerInfo` *Any*
|
||||
Returns the response of the provider. In case the provider is a Generic OAuth Provider, the information is accessible through:
|
||||
- `rawInfo` *Any*
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `v1`
|
||||
- `user`
|
||||
- `appendMetadata(string, Any)`
|
||||
The first parameter represents the key and the second a value which will be stored
|
||||
- `setFirstName(string)`
|
||||
Sets the first name
|
||||
- `setLastName(string)`
|
||||
Sets the last name
|
||||
- `setNickName(string)`
|
||||
Sets the nickname
|
||||
- `setDisplayName(string)`
|
||||
Sets the display name
|
||||
- `setPreferredLanguage(string)`
|
||||
Sets the preferred language. Please use the format defined in [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646)
|
||||
- `setPreferredUsername(string)`
|
||||
Sets the preferred username
|
||||
- `setEmail(string)`
|
||||
Sets the email address of the user
|
||||
- `setEmailVerified(boolean)`
|
||||
Sets the email address verified or unverified
|
||||
- `setPhone(string)`
|
||||
Sets the phone number of the user
|
||||
- `setPhoneVerified(boolean)`
|
||||
Sets the phone number verified or unverified
|
||||
- `metadata`
|
||||
Array of [*metadata*](./objects#metadata-with-value-as-bytes). This function is deprecated, please use `api.v1.user.appendMetadata`
|
||||
|
||||
## Pre Creation
|
||||
|
||||
A user selected **Register** on the overview page after external authentication. ZITADEL did not create the user yet.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_PRE_CREATION` or `2`.
|
||||
|
||||
### Parameters of Pre Creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `v1`
|
||||
- `user` [*human*](./objects#human-user)
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `metadata`
|
||||
Array of [*metadata*](./objects#metadata-with-value-as-bytes). This function is deprecated, please use `api.v1.user.appendMetadata`
|
||||
- `setFirstName(string)`
|
||||
Sets the first name
|
||||
- `setLastName(string)`
|
||||
Sets the last name
|
||||
- `setNickName(string)`
|
||||
Sets the nick name
|
||||
- `setDisplayName(string)`
|
||||
Sets the display name
|
||||
- `setPreferredLanguage(string)`
|
||||
Sets the preferred language, the string has to be a valid language tag as defined in [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646)
|
||||
- `setGender(int)`
|
||||
Sets the gender.
|
||||
<ul><li>0: unspecified</li><li>1: female</li><li>2: male</li><li>3: diverse</li></ul>
|
||||
- `setUsername(string)`
|
||||
Sets the username
|
||||
- `setEmail(string)`
|
||||
Sets the email
|
||||
- `setEmailVerified(bool)`
|
||||
If true the email set is verified without user interaction
|
||||
- `setPhone(string)`
|
||||
Sets the phone number
|
||||
- `setPhoneVerified(bool)`
|
||||
If true the phone number set is verified without user interaction
|
||||
- `v1`
|
||||
- `user`
|
||||
- `appendMetadata(string, Any)`
|
||||
The first parameter represents the key and the second a value which will be stored
|
||||
|
||||
## Post Creation
|
||||
|
||||
A user selected **Register** on the overview page after external authentication and ZITADEL successfully created the user.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_POST_CREATION` or `3`.
|
||||
|
||||
### Parameters of Post Creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `v1`
|
||||
- `getUser()` [*user*](./objects#user)
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `org`
|
||||
- `getMetadata()` [*metadataResult*](./objects#metadata-result)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `userGrants` Array of [*userGrant*](./objects#user-grant)'s
|
||||
- `v1`
|
||||
- `appendUserGrant(`[`userGrant`](./objects#user-grant)`)`
|
||||
@@ -0,0 +1,103 @@
|
||||
---
|
||||
title: Internal Authentication Flow
|
||||
---
|
||||
|
||||
This flow is executed if the user logs in using the login UI hosted by ZITADEL.
|
||||
|
||||
The flow is represented by the following Ids in the API: `3`
|
||||
|
||||
## Post Authentication
|
||||
|
||||
A user has authenticated directly at ZITADEL.
|
||||
ZITADEL validated the users inputs for password, one-time password or passkey.
|
||||
Each validation step triggers the action.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_POST_AUTHENTICATION` or `1`.
|
||||
|
||||
### Parameters of Post Authentication Action
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `v1`
|
||||
- `authMethod` *string*
|
||||
This is one of "password", "OTP", "U2F" or "passwordless"
|
||||
- `authError` *string*
|
||||
This is a verification errors string representation. If the verification succeeds, this is "none"
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `metadata`
|
||||
Array of [*metadata*](./objects#metadata-with-value-as-bytes). This function is deprecated, please use `api.v1.user.appendMetadata`
|
||||
- `v1`
|
||||
- `user`
|
||||
- `appendMetadata(string, Any)`
|
||||
The first parameter represents the key and the second a value which will be stored
|
||||
|
||||
## Pre Creation
|
||||
|
||||
A user registers directly at ZITADEL.
|
||||
ZITADEL did not create the user yet.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_PRE_CREATION` or `2`.
|
||||
|
||||
### Parameters of Pre Creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `v1`
|
||||
- `user` [*human*](./objects#human-user)
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `metadata`
|
||||
Array of [*metadata*](./objects#metadata-with-value-as-bytes). This function is deprecated, please use `api.v1.user.appendMetadata`
|
||||
- `setFirstName(string)`
|
||||
Sets the first name
|
||||
- `setLastName(string)`
|
||||
Sets the last name
|
||||
- `setNickName(string)`
|
||||
Sets the nick name
|
||||
- `setDisplayName(string)`
|
||||
Sets the display name
|
||||
- `setPreferredLanguage(string)`
|
||||
Sets the preferred language, the string has to be a valid language tag as defined in [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646)
|
||||
- `setGender(int)`
|
||||
Sets the gender.
|
||||
<ul><li>0: unspecified</li><li>1: female</li><li>2: male</li><li>3: diverse</li></ul>
|
||||
- `setUsername(string)`
|
||||
Sets the username
|
||||
- `setEmail(string)`
|
||||
Sets the email
|
||||
- `setEmailVerified(bool)`
|
||||
If true the email set is verified without user interaction
|
||||
- `setPhone(string)`
|
||||
Sets the phone number
|
||||
- `setPhoneVerified(bool)`
|
||||
If true the phone number set is verified without user interaction
|
||||
- `v1`
|
||||
- `user`
|
||||
- `appendMetadata(string, Any)`
|
||||
The first parameter represents the key and the second a value which will be stored
|
||||
|
||||
## Post Creation
|
||||
|
||||
A user registers directly at ZITADEL.
|
||||
ZITADEL successfully created the user.
|
||||
|
||||
The trigger is represented by the following Ids in the API: `TRIGGER_TYPE_POST_CREATION` or `3`.
|
||||
|
||||
### Parameters of Post Creation
|
||||
|
||||
- `ctx`
|
||||
The first parameter contains the following fields
|
||||
- `v1`
|
||||
- `getUser()` [*user*](./objects#user)
|
||||
- `authRequest` [*auth request*](/apis/actions/objects#auth-request)
|
||||
- `httpRequest` [*http request*](/apis/actions/objects#http-request)
|
||||
- `api`
|
||||
The second parameter contains the following fields
|
||||
- `userGrants` Array of [*userGrant*](./objects#user-grant)'s
|
||||
- `v1`
|
||||
- `appendUserGrant(`[`userGrant`](./objects#user-grant)`)`
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Actions
|
||||
---
|
||||
|
||||
This page describes the options you have when writing ZITADEL actions scripts.
|
||||
|
||||
## Language
|
||||
|
||||
ZITADEL interprets the scripts as JavaScript.
|
||||
Make sure your scripts are ECMAScript 5.1(+) compliant.
|
||||
Go to the [goja GitHub page](https://github.com/dop251/goja) for detailed reference about the underlying library features and limitations.
|
||||
|
||||
Stuck customizing ZITADEL actions? Find samples for setting OIDC claims, SAML attributes, extending JIT provisioning data, calling external APIs, and more in [this repository](https://github.com/zitadel/actions).
|
||||
|
||||
Actions are a key feature to extend the functionality of ZITADEL and continuously improve the feature and expand the use cases. Check out our [roadmap](https://zitadel.com/roadmap) for more details.
|
||||
|
||||
## Action
|
||||
|
||||
The action object describes the logic defined by the user. Actions can be linked to multiple [triggers](#flows).
|
||||
|
||||
The name of the action must corelate with the javascript function in the code section. This function will be called by ZITADEL.
|
||||
|
||||
For reading and mutating state, the runtime executes the function that has the same name as the action.
|
||||
The function receives the JavaScript objects `ctx` and `api`.
|
||||
|
||||
The object `ctx` provides readable information as object properties and by callable functions.
|
||||
The object `api` provides mutable properties and state mutating functions.
|
||||
|
||||
The script of an action called **doSomething** should have a function called `doSomething` and look something like this:
|
||||
|
||||
```js
|
||||
function doSomething(ctx, api){
|
||||
// read from ctx and manipulate with api
|
||||
}
|
||||
```
|
||||
|
||||
## Flows
|
||||
|
||||
Flows are the links between an [action](#action) and a specific point during a user interaction with ZITADEL. These specific point are called [Trigger Types](#trigger-types).
|
||||
|
||||
## Trigger Types
|
||||
|
||||
Trigger types define the point during execution of request. Each trigger defines which readable information (`ctx`) and mutual properties (`api`) are passed into the called function as well as which libraries are available for the function. Each trigger type is described in the [available flow types section](#available-flow-types)
|
||||
|
||||
## Available Flow Types
|
||||
|
||||
Currently ZITADEL provides the following flows:
|
||||
|
||||
- [Internal Authentication](./internal-authentication)
|
||||
- [External Authentication](./external-authentication)
|
||||
- [Complement Token](./complement-token)
|
||||
- [Complement SAML Response](./customize-samlresponse)
|
||||
|
||||
## Available Modules inside Javascript
|
||||
|
||||
- [HTTP module](./modules#http) to call API's
|
||||
- [Logging module](./modules#log) logs information to stdout
|
||||
- [UUID module](./modules#uuid) generates uuids
|
||||
@@ -0,0 +1,148 @@
|
||||
---
|
||||
title: Modules
|
||||
---
|
||||
|
||||
ZITADEL provides the following modules.
|
||||
|
||||
## HTTP
|
||||
|
||||
This module provides functionality to call REST APIs.
|
||||
|
||||
### Import
|
||||
|
||||
```js
|
||||
let http = require('zitadel/http')
|
||||
```
|
||||
|
||||
### `fetch()` function
|
||||
|
||||
This function allows to call HTTP servers. The function does NOT fulfil the [Fetch API specification](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
||||
|
||||
#### Parameters
|
||||
|
||||
- `url` *string*
|
||||
- `options`
|
||||
**Optional**, containing custom settings that you want to apply to the request.
|
||||
- `headers`
|
||||
Overwrites the default headers. One of the following types
|
||||
- *map[string] string*
|
||||
The value is split into separate values after each comma `,`.
|
||||
- *map[string] Array of string*
|
||||
The value is a string array
|
||||
- default:
|
||||
- `Content-Type`: `application/json`
|
||||
- `Accept`: `application/json`
|
||||
- `method`
|
||||
The request method. Allowed values are `GET`, `POST`, `PUT`, `DELETE`
|
||||
- `body` *Object*
|
||||
JSON representation
|
||||
|
||||
#### Response
|
||||
|
||||
If the request was invalid, an error will be thrown, otherwise a Response object will be returned.
|
||||
|
||||
The object has the following fields and methods:
|
||||
|
||||
- `status` *number*
|
||||
Status code of response
|
||||
- `body` *string*
|
||||
Return value
|
||||
- `json()` *Object*
|
||||
Returns the body as JSON object, or throws an error if the body is not a json object.
|
||||
- `text()` *string*
|
||||
Returns the body
|
||||
|
||||
### Example
|
||||
|
||||
```js reference
|
||||
https://github.com/zitadel/actions/blob/main/examples/make_api_call.js#L10-L20
|
||||
```
|
||||
|
||||
## Log
|
||||
|
||||
The log module provides you with the functionality to log to stdout.
|
||||
|
||||
### Import
|
||||
|
||||
```js
|
||||
let logger = require("zitadel/log")
|
||||
```
|
||||
|
||||
### `log()`, `warn()`, `error()` function
|
||||
|
||||
The logger offers three distinct log levels (info, warn, and error) to effectively communicate messages based on their severity, enhancing debugging and troubleshooting efficiency.
|
||||
Use the function that reflects your log level.
|
||||
|
||||
- log()
|
||||
- warn()
|
||||
- error()
|
||||
|
||||
### Example
|
||||
|
||||
```js
|
||||
logger.log("This is an info log.")
|
||||
|
||||
logger.warn("This is a warn log.")
|
||||
|
||||
logger.error("This is an error log.")
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
- `msg` *string*
|
||||
The message you want to print out.
|
||||
|
||||
## UUID
|
||||
|
||||
This module provides functionality to generate a UUID
|
||||
|
||||
### Import
|
||||
|
||||
```js
|
||||
let uuid = require("zitadel/uuid")
|
||||
```
|
||||
|
||||
### `uuid.vX()` function
|
||||
|
||||
This function generates a UUID using [google/uuid](https://github.com/google/uuid). `vX` allows to define the UUID version:
|
||||
|
||||
- `uuid.v1()` *string*
|
||||
Generates a UUID version 1, based on date-time and MAC address
|
||||
- `uuid.v3(namespace, data)` *string*
|
||||
Generates a UUID version 3, based on the provided namespace using MD5
|
||||
- `uuid.v4()` *string*
|
||||
Generates a UUID version 4, which is randomly generated
|
||||
- `uuid.v5(namespace, data)` *string*
|
||||
Generates a UUID version 5, based on the provided namespace using SHA1
|
||||
|
||||
#### Parameters
|
||||
|
||||
- `namespace` *UUID*/*string*
|
||||
Namespace to be used in the hashing function. Either provide one of defined [namespaces](#namespaces) or a string representing a UUID.
|
||||
- `data` *[]byte*/*string*
|
||||
data to be used in the hashing function. Possible types are []byte or string.
|
||||
|
||||
### Namespaces
|
||||
|
||||
The following predefined namespaces can be used for `uuid.v3` and `uuid.v5`:
|
||||
|
||||
- `uuid.namespaceDNS` *UUID*
|
||||
6ba7b810-9dad-11d1-80b4-00c04fd430c8
|
||||
- `uuid.namespaceURL` *UUID*
|
||||
6ba7b811-9dad-11d1-80b4-00c04fd430c8
|
||||
- `uuid.namespaceOID` *UUID*
|
||||
6ba7b812-9dad-11d1-80b4-00c04fd430c8
|
||||
- `uuid.namespaceX500` *UUID*
|
||||
6ba7b814-9dad-11d1-80b4-00c04fd430c8
|
||||
|
||||
### Example
|
||||
```js
|
||||
let uuid = require("zitadel/uuid")
|
||||
function setUUID(ctx, api) {
|
||||
if (api.metadata === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
api.v1.user.appendMetadata('custom-id', uuid.v4());
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,214 @@
|
||||
---
|
||||
title: Objects
|
||||
---
|
||||
|
||||
## External User
|
||||
|
||||
- `externalId` *string*
|
||||
User id from the identity provider
|
||||
- `externalIdpId` *string*
|
||||
Id of the identity provider
|
||||
- `human`
|
||||
- `firstName` *string*
|
||||
- `lastName` *string*
|
||||
- `nickName` *string*
|
||||
- `displayName` *string*
|
||||
- `preferredLanguage` *string*
|
||||
In [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646) format
|
||||
- `email` *string*
|
||||
- `isEmailVerified` *boolean*
|
||||
- `phone` *string*
|
||||
- `isPhoneVerified` *boolean*
|
||||
|
||||
## metadata with value as bytes
|
||||
|
||||
- `key` *string*
|
||||
- `value` Array of *byte*
|
||||
|
||||
## metadata result
|
||||
|
||||
- `count` *number*
|
||||
- `sequence` *number*
|
||||
- `timestamp` *Date*
|
||||
- `metadata` Array of [*metadata*](#metadata)
|
||||
|
||||
## metadata
|
||||
|
||||
- `creationDate` *Date*
|
||||
- `changeDate` *Date*
|
||||
- `resourceOwner` *string*
|
||||
- `sequence` *number*
|
||||
- `key` *string*
|
||||
- `value` `Any`
|
||||
|
||||
## user grant
|
||||
|
||||
- `projectID` *string*
|
||||
Required. Id of the project to be granted
|
||||
- `projectGrantID` *string*
|
||||
Optional. If the grant is for a project grant, include projectGrantID
|
||||
- `roles` Array of *string*
|
||||
Containing the roles
|
||||
|
||||
## user
|
||||
|
||||
- `id` *string*
|
||||
- `creationDate` *Date*
|
||||
- `changeDate` *Date*
|
||||
- `resourceOwner` *string*
|
||||
- `sequence` *number*
|
||||
Unsigned 64 bit integer
|
||||
- `state` *number*
|
||||
<ul><li>0: unspecified</li><li>1: active</li><li>2: inactive</li><li>3: deleted</li><li>4: locked</li><li>5: suspended</li><li>6: initial</li></ul>
|
||||
- `username` *string*
|
||||
- `loginNames` Array of *string*
|
||||
- `preferredLoginName` *string*
|
||||
- `human`
|
||||
Set if the user is human
|
||||
- `firstName` *string*
|
||||
- `lastName` *string*
|
||||
- `nickName` *string*
|
||||
- `displayName` *string*
|
||||
- `avatarKey` *string*
|
||||
- `preferredLanguage` *string*
|
||||
In [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646) format
|
||||
- `gender` *number*
|
||||
<ul><li>0: unspecified</li><li>1: female</li><li>2: male</li><li>3: diverse</li></ul>
|
||||
- `email` *string*
|
||||
- `isEmailVerified` *boolean*
|
||||
- `phone` *string*
|
||||
- `isPhoneVerified` *boolean*
|
||||
- `machine`
|
||||
Set if the user is a machine
|
||||
- `name` *string*
|
||||
- `description` *string*
|
||||
|
||||
## human user
|
||||
|
||||
- `id` *string*
|
||||
- `creationDate` *Date*
|
||||
- `changeDate` *Date*
|
||||
- `resourceOwner` *string*
|
||||
- `sequence` *number*
|
||||
- `state` *number*
|
||||
<ul><li>0: unspecified</li><li>1: active</li><li>2: inactive</li><li>3: deleted</li><li>4: locked</li><li>5: suspended</li><li>6: initial</li></ul>
|
||||
- `username` *string*
|
||||
- `loginNames` Array of *string*
|
||||
- `preferredLoginName` *string*
|
||||
- `profile`
|
||||
- `firstName` *string*
|
||||
- `lastName` *string*
|
||||
- `nickName` *string*
|
||||
- `displayName` *string*
|
||||
- `preferredLanguage` *string*
|
||||
In [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646) format
|
||||
- `email`
|
||||
- `email` *string*
|
||||
- `isEmailVerified` *boolean*
|
||||
- `phone`
|
||||
- `phone` *string*
|
||||
- `isPhoneVerified` *boolean*
|
||||
|
||||
## Auth Request
|
||||
|
||||
This object contains context information about the request to the [authorization endpoint](/apis/openidoauth/endpoints#authorization-endpoint).
|
||||
|
||||
- `id` *string*
|
||||
- `agentId` *string*
|
||||
- `creationDate` *Date*
|
||||
- `changeDate` *Date*
|
||||
- `browserInfo` *browserInfo*
|
||||
- `userAgent` *string*
|
||||
- `acceptLanguage` *string*
|
||||
- `remoteIp` *string*
|
||||
- `applicationId` *string*
|
||||
- `callbackUri` *string*
|
||||
- `transferState` *string*
|
||||
- `prompt` Array of *Number*
|
||||
<ul><li>0: not specified</li><li>1: none</li><li>2: login</li><li>3: consent</li><li>4: select_account</li><li>5: create</li></ul>
|
||||
- `uiLocales` Array of *string*
|
||||
- `loginHint` *string*
|
||||
- `maxAuthAge` *Number*
|
||||
Duration in nanoseconds
|
||||
- `instanceId` *string*
|
||||
- `request`
|
||||
- `oidc`
|
||||
- `scopes` Array of *string*
|
||||
- `userId` *string*
|
||||
- `userName` *string*
|
||||
- `loginName` *string*
|
||||
- `displayName` *string*
|
||||
- `resourceOwner` *string*
|
||||
- `requestedOrgId` *string*
|
||||
- `requestedOrgName` *string*
|
||||
- `requestedPrimaryDomain` *string*
|
||||
- `requestedOrgDomain` *bool*
|
||||
- `applicationResourceOwner` *string*
|
||||
- `privateLabelingSetting` *Number*
|
||||
<ul><li>0: Unspecified</li><li>1: Enforce project's policy</li><li>2: Allow user's organization login policy</li></ul>
|
||||
- `selectedIdpConfigId` *string*
|
||||
- `linkingUsers` Array of [*ExternalUser*](#external-user)
|
||||
- `passwordVerified` *bool*
|
||||
- `mfasVerified` Array of *Number*
|
||||
<ul><li>0: OTP</li><li>1: U2F</li><li>2: U2F User verification</li></ul>
|
||||
- `audience` Array of *string*
|
||||
- `authTime` *Date*
|
||||
|
||||
## HTTP Request
|
||||
|
||||
This object is based on the Golang struct [http.Request](https://pkg.go.dev/net/http#Request), some attributes are removed as not all provided information is usable in this context.
|
||||
|
||||
- `method` *string*
|
||||
- `url` *string*
|
||||
- `proto` *string*
|
||||
- `contentLength` *number*
|
||||
- `host` *string*
|
||||
- `form` Map *string* of Array of *string*
|
||||
- `postForm` Map *string* of Array of *string*
|
||||
- `remoteAddr` *string*
|
||||
- `headers` Map *string* of Array of *string*
|
||||
|
||||
## Claims
|
||||
|
||||
This object represents [the claims](../openidoauth/claims) which will be written into the oidc token.
|
||||
|
||||
- `sub` *string*
|
||||
- `name` *string*
|
||||
- `email` *string*
|
||||
- `locale` *string*
|
||||
- `given_name` *string*
|
||||
- `family_name` *string*
|
||||
- `preferred_username` *string*
|
||||
- `email_verified` *bool*
|
||||
- `updated_at` *Number*
|
||||
|
||||
Additionally there could additional fields depending on the configuration of your [project](../../guides/manage/console/projects-overview#role-settings) and your [application](../../guides/manage/console/applications-overview#token-settings)
|
||||
|
||||
## user grant list
|
||||
|
||||
This object represents a list of user grant stored in ZITADEL.
|
||||
|
||||
- `count` *Number*
|
||||
- `sequence` *Number*
|
||||
- `timestamp` *Date*
|
||||
- `grants` Array of
|
||||
- `id` *string*
|
||||
- `projectGrantId` *string*
|
||||
The id of the [project grant](/guides/solution-scenarios/saas#project-grant)
|
||||
- `state` *Number*
|
||||
<ul><li>0: unspecified</li><li>1: active</li><li>2: inactive</li><li>3: removed</li></ul>
|
||||
- `creationDate` *Date*
|
||||
- `changeDate` *Date*
|
||||
- `sequence` *Number*
|
||||
- `userId` *string*
|
||||
- `roles` Array of *string*
|
||||
- `userResourceOwner` *string*
|
||||
The id of the organization of the user
|
||||
- `userGrantResourceOwner` *string*
|
||||
The id of the organization, where the user was granted
|
||||
- `userGrantResourceOwnerName` *string*
|
||||
The name of the organization, where the user was granted
|
||||
- `projectId` *string*
|
||||
- `projectName` *string*
|
||||
- `getOrgMetadata()` [*metadataResult*](#metadata-result)
|
||||
Get the metadata of the organization where the user was granted
|
||||
Reference in New Issue
Block a user