Personify
  • Introduction
  • Architecture
  • Model
    • Identity vault
    • Provisioning
    • Authentication and authorization
    • Gateway
  • Concepts
    • Entitlements
      • Internal entitlements
      • Custom entitlements
    • Workflows
    • Joiner - Mover - Leaver
    • Self service
    • Entitlement expiration
    • Toxic entitlements
    • (Re)Certification
    • Birth rights
    • Notifications
    • Entitlement prerequisites
    • Connectors
      • File connector
      • Database connector
      • SCIM Connector
      • LDAP connector
      • REST connector
      • Microsoft Graph connector
    • Auditing
    • Authorization
    • Gateway
    • API Based
    • Delegation
  • Usage
    • Get started
    • Configuration
  • Development
    • Customizations
      • PropertyProviders
      • AccountIdGenerators
      • RequestHandlers
      • Connectors
      • Workflows
      • Schedulers
    • REST API
    • JAVA SDK
    • Git
    • Issues
Powered by GitBook
On this page
  1. Development
  2. Customizations

RequestHandlers

Request handlers are used in the gateway component.

For each site configuration, multiple request handlers can be configured. This way extra functions are available.

Currently, following request handlers are deployed:

  • AuthenticationCookieHandler: checks for authentication cookie and redirects to login

  • ResourceExpirationHandler: sets expiration headers for a pattern

  • SetHeaderHandler : sets headers

  • RemoveWWWHandler: if url with www is asked, strip it

Crafting your own request handler

You can create your own generator implementation by creating a new java maven project and include following dependency:

<dependency>
    <groupId>be.personify</groupId>
    <artifactId>personify-util</artifactId>
    <version>1.4.1.RELEASE</version>
</dependency>

This will give you the possibility of implementing the class HttpRequestHandler.

....
import be.personify.util.http.HttpRequestHandler;
....

public class CustomHandler extends HttpRequestHandler {
  
  @Override
  public void handle(HttpServletRequest request, HttpServletResponse response) throws Exception {
    ....
  }
  
  @Override
  public Map<String, String> collectHeaderOverrides() {
	return null;
  }

}

The handle method gives you access to the request and the response.

collectHeaderOverrides lets you override the headers.

PreviousAccountIdGeneratorsNextConnectors

Last updated 2 years ago