November 2018
Intermediate to advanced
388 pages
9h 5m
English
Now let's add a concrete audit handler. We write four handlers at this point: PersonAuditHandler, DeviceAuditHandler, GroupAuditHandler, and OrganizationAuditHandler. Here, we will explain PersonAuditHandler.
In the handleRequest() function, we take the Identity instance as the request. If identityType is a person, we process the request in the handler class. If not, we pass the control to the next handler in the chain:
override fun handleRequest(identityRequest: Identity) { if (identityRequest.identityType == IdentityType.PERSON) { //.. } else { auditHandler.handleRequest(identityRequest) }}
If the identity is a person, then we prepare an audit message and a participant object, as follows:
if (identityRequest.identityType ...
Read now
Unlock full access