This page provides the event and associated payload for the Authorization microservice.
Event
SL.# | NAME | DESCRIPTION | PUBLISH LOCATION | ROUTING KEY | DURABILITY | PAYLOAD TYPE |
---|---|---|---|---|---|---|
1 | User Role Event | This event is triggered when the role(s) are assigned to a user, the role(s) are updated for a user, and/or the role(s) are deleted from a user. | ecomm - exchange | auth.userrole.# | true | UserRoleEvent |
Payload Model
Below is the payload for the Authorization microservice.
UserRoleEvent
Property | Type | Description | Example |
---|---|---|---|
added.userId | long | Indicates the unique ID of the user for whom the role is assigned. | 10 |
added.roles.id | long | Indicates the unique ID of the role. | 100 |
added.roles.userId | long | Indicates the unique ID of the user for whom the role is assigned. | 10 |
added.roles.roleName | string | Indicates the name of the role to be added. | ROLE_SEARCH_ADMIN |
added.roles.service | string | Indicates the name of the service in which the role is applicable. One of the collection ID of this service will be listed under the property added.roles.serviceCollectionId . | search |
added.roles.businessId | long | Indicates the unique ID of the business. | 20 |
added.roles.collectionId | long | Indicates the unique ID of the collection. The Authorization service will contain this collection ID. | 1 |
added.roles.serviceCollectionId | long | Holds the unique ID of the collection of the service for which the role is applicable. This service collection ID will be created under the property added.roles.service . | 25 |
added.roles.attribute | JSON | Indicates the attribute(s) of the service. It is used to give role-specific attributes to the user. | {"\CatalogId":100, "\Category":"shirts"} |
added.roles.storeId | long | Indicates the unique ID of the store. | 5 |
removed.userId | long | Indicates the unique ID of the user for whom the role is removed. | 10 |
removed.roles.id | long | Indicates the unique ID of the role. | 100 |
removed.roles.userId | long | Indicates the unique ID of the user for whom the role is removed. | 10 |
removed.roles.roleName | string | Indicates the name of the role to be removed. | ROLE_PROMOTION_ADMIN |
removed.roles.service | string | Indicates the name of the service in which the role is applicable. One of the collection ID of this service will be listed under the property removed.roles.serviceCollectionId . | promotion |
removed.roles.businessId | long | Indicates the unique ID of the business. | 20 |
removed.roles.collectionId | long | Indicates the unique ID of the collection. The Authorization service should contain this collection ID. | 1 |
removed.roles.serviceCollectionId | long | Holds the unique ID of the collection of the service for which the role is applicable. This service collection ID should be created under the property removed.roles.service . | 28 |
removed.roles.attribute | JSON | Indicates the attribute(s) of the service. It is used to give role-specific attributes to the user. | {"\PromotionId":100} |
removed.roles.storeId | long | Indicates the unique ID of the store. | 5 |
updated.userId | long | Indicates the unique ID of the user for whom the role is updated. | 10 |
updated.roles.id | long | Indicates the unique ID of the role. | 100 |
updated.roles.userId | long | Indicates the unique ID of the user for whom the role is updated. | 10 |
updated.roles.roleName | string | Indicates the name of the role to be updated. | ROLE_PRICING_ADMIN |
updated.roles.service | string | Indicates the name of the service in which the role is applicable. One of the collection ID of this service will be listed under the property updated.roles.serviceCollectionId . | pricing |
updated.roles.businessId | long | Indicates the unique ID of the business. | 20 |
updated.roles.collectionId | long | Indicates the unique ID of the collection. The Authorization service should contain this collection ID. | 1 |
updated.roles.serviceCollectionId | long | Holds the unique ID of the collection of the service for which the role is applicable. This service collection ID should be created under the property updated.roles.service . | 25 |
updated.roles.attribute | JSON | Indicates the attribute(s) of the service. It is used to give role-specific attributes to the user. | {"\CatalogId":100, "\PriceId":200} |
updated.roles.storeId | long | Indicates the unique ID of the store. | 5 |
Revision History
2019-07-09 | Ananthi – Content updated for July 2019 release.
2019-01-21 | PLK – Page added.