Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

Create a policy plugin

Prev Next

Introduction

The policy plugin stored in com.noknok.gateway.plugin.policy.DefaultPolicyManager is used in the API Server default configuration. A user-written custom policy manager plugin must implement the IPolicyManager interface.

For information about building and deploying custom API Server plugins, see Create a plugin.

Interface

package com.noknok.gateway.sdk;
        /**
        * Implement this interface to create a Policy Plugin.
        * This interface defines a single method to get the policy name.
        * Implementations should have a single constructor with the following
        * signature:
        * public MyPolicyManager (IConfigurationManager configurationManager,
        * String tenantID, String objectType);
        */
        public interface IPolicyManager {
        /**
        * Called when REST APIs, which require authorization, are accessed,
        * such as at registration and step-up auth APIs.Implementation class
        * may want to use either input jsonRequest or any other retrieved data
        * from HttpServletRequest instance.
        * Parameters:
        * request - HTTP request from client.
        * jsonRequest - REST request for Authentication Server.
        * Returns:
        * Policy name to be used for the operation on the
        * Digipass S3 Authentication server.
        * Throws:
        * BadRequestException - if request is invalid.
        * InternalErrorException - if other errors occur.
        */
        String getPolicyName(javax.servlet.http.HttpServletRequest request,
        com.google.gson.JsonObject jsonRequest);
        }