API v1.0 contract to implement
The API contract for pre-issue ID token action (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
BearerAuth: HTTP bearer
ApiKeyAuth: API key in header "X-API-Key"
Other
handle pre-issue ID token events
POST /
Request body (required): application/json
Schema: RequestBody
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | A unique identifier that associates with the token issuing flow in WSO2 Identity Platform | |
requestId | string | A unique correlation identifier that associates with the token request received by WSO2 Identity Platform | |
actionType | string | Yes | Specifies the action being triggered, which in this case is PRE_ISSUE_ID_TOKEN. Allowed values: |
event | Event | Yes | Defines the context data related to the pre issue ID token event that needs to be shared with the custom service to process and execute. |
allowedOperations | AllowedOperations | Yes | Defines the set of operations that your external service is permitted to perform on the ID token's claims. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Ok | one of: SuccessResponse, FailedResponse |
400 | Bad Request | ErrorResponse |
500 | Server Error | ErrorResponse |
Schemas
Event
Type: object
Defines the context data related to the pre issue ID token event that needs to be shared with the custom service to process and execute.
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
request | Request | Yes | Any additional parameters included in the ID token request. These may be custom parameters defined by the client or necessary for specific flows. |
tenant | Tenant | Yes | This property represents the tenant under which the token request is being processed. |
user | User | Contains information about the authenticated user associated with the token request. | |
organization | Organization | This property represents the organization context. | |
userStore | UserStore | Indicates the user store in which the user's data is being managed. | |
idToken | IdToken | Yes | Represents the ID token that is about to be issued. It contains claims of the ID token which can then be modified by your external service based on the logic implemented in the pre-issue ID token action. |
Request
Type: object
Any additional parameters included in the ID token request. These may be custom parameters defined by the client or necessary for specific flows.
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
grantType | string | The type of OAuth2 grant used for the token request, such as | |
responseType | string | The type of response requested by the client in the OIDC hybrid flow, such as | |
clientId | string | The unique identifier of the client (application) that is requesting the ID token. | |
scopes | array of string | The scopes present in the incoming token request (OAuth2/OIDC hybrid flow). The openid scope must be present to obtain an ID token. Some scopes control what is included in the ID token (for example, profile for profile-related claims and address for address-related claims). Other scopes appear here because they are associated with permissions on the access token issued together with the ID token. | |
additionalHeaders | array of RequestHeaders | Any additional HTTP headers included in the ID token request. These may contain custom information or metadata sent by the client. | |
additionalParams | array of RequestParams |
Tenant
Type: object
This property represents the tenant under which the token request is being processed.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique numeric identifier of the tenant. |
name | string | Yes | The domain name of the tenant. |
User
Type: object
Contains information about the authenticated user associated with the token request.
9 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the user. | |
organization | Organization | Refers to the organization to which the user belongs. | |
userType | string | Defines the type of user. | |
federatedIdP | string | The name of the federated identity provider used to authenticate the user. This is only applicable for | |
accessingOrganization | Organization | Refers to the organization that the user is accessing. Applies only to the | |
accessingOrganization.id | string | Yes | The unique identifier of the organization. |
accessingOrganization.name | string | Yes | Name of the organization used to identify the organization in configurations, user interfaces, etc. |
accessingOrganization.orgHandle | string | The organization handle. | |
accessingOrganization.depth | integer | The depth of the organization in the hierarchy. |
Organization
Type: object
This property represents the organization context.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the organization. |
name | string | Yes | Name of the organization used to identify the organization in configurations, user interfaces, etc. |
orgHandle | string | The organization handle. | |
depth | integer | The depth of the organization in the hierarchy. |
UserStore
Type: object
Indicates the user store in which the user's data is being managed.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier for the user store. |
name | string | Yes | User store name used to identify the user store in configuration settings, user interfaces, and administrative tasks. |
IdToken
Type: object
Represents the ID token that is about to be issued. It contains claims of the ID token which can then be modified by your external service based on the logic implemented in the pre-issue ID token action.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
claims | array of IdTokenClaims | Yes | An array that contains both standard ID token claims and any OpenID Connect (OIDC) claims configured to be included in the ID token. Standard claims:
OIDC claims are any additional claims configured in the application to be included in the ID token. These claims are based on the OIDC standard and may include user profile information such as email, given_name, or custom claims specific to the application. |
AllowedOperations
Type: array of any of: addOperation, replaceOperation, removeOperation
Defines the set of operations that your external service is permitted to perform on the ID token's claims.
addOperation
Type: object
Defines the add operation.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
paths | array of string | Yes |
replaceOperation
Type: object
Defines the replace operation.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
paths | array of string | Yes |
removeOperation
Type: object
Defines the remove operation.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
paths | array of string | Yes |
SuccessResponse
Type: object
Defines the success response.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Indicates the outcome of the request. For a successful operation, this should be set to Allowed values: |
operations | array of any of: addOperationResponse, replaceOperationResponse, removeOperationResponse | Defines the set of operations that your external service is requesting to perform on the ID token's claims. |
FailedResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Indicates the outcome of the request. For a failed operation, this should be set to Allowed values: |
failureReason | string | Yes | Provides the reason for failing to issue an ID token. |
failureDescription | string | Yes | Offers a detailed explanation of the failure. |
ErrorResponse
Type: object
When the external service responds with an ERROR state, it can return an HTTP status code of 400, 401, or 500, indicating either a validation failure or an issue processing the request.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Indicates the outcome of the request. For an error operation, this should be set to Allowed values: |
errorMessage | string | Yes | The cause of the error. |
errorDescription | string | Yes | A detailed description of the error. |
RequestBody
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | A unique identifier that associates with the token issuing flow in WSO2 Identity Platform | |
requestId | string | A unique correlation identifier that associates with the token request received by WSO2 Identity Platform | |
actionType | string | Yes | Specifies the action being triggered, which in this case is PRE_ISSUE_ID_TOKEN. Allowed values: |
event | Event | Yes | Defines the context data related to the pre issue ID token event that needs to be shared with the custom service to process and execute. |
allowedOperations | AllowedOperations | Yes | Defines the set of operations that your external service is permitted to perform on the ID token's claims. |
RequestHeaders
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
value | array of string | Yes |
RequestParams
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
value | array of string | Yes |
IdTokenClaims
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
value | one of: string, integer, boolean, array of string, object |
addOperationResponse
Type: object
Defines the add operation response.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
path | string | Yes | Defines the path for the add operation. Should be one from the allowed paths of add operation in the allowedOperations. |
value | one of: string, CustomValue | Yes | Defines the value for the add operation. |
replaceOperationResponse
Type: object
Defines the replace operation response.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
path | string | Yes | Defines the path for the replace operation. Should be one from the allowed paths of replace operation in the allowedOperations. |
value | one of: string, object | Yes | Defines the value for the replace operation. |
removeOperationResponse
Type: object
Defines the remove operation response.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Yes | Allowed values: |
path | string | Yes | Defines the path for the remove operation. Should be one from the allowed paths of remove operation in the allowedOperations. |
CustomValue
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
value | one of: string, integer, boolean, array of string, object | Yes |
Was this page helpful?