API Authenticator Plugin

Introduction

The API Authenticator Plugin serves as an extension or replacement for the default authentication methods available in the API Builder. This plugin type must extend org.joget.api.model.ApiAuthenticatorAbstract abstract class.

Get started

POM file adjustments

Add the project dependencies below:

<!-- Add this dependency for authenticate(...) params -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jsp-api</artifactId>
    <version>2.0</version>
</dependency>
 
<!-- Add apibuilder_api dependency -->
<dependency>
    <groupId>org.joget.api</groupId>
    <artifactId>apibuilder_api</artifactId>
    <version>${project.version}</version>
    <scope>provided</scope>
</dependency>

Abstract class

org.joget.api.model.ApiAuthenticatorAbstract

Abstract methods

authenticate
 

Used to authenticate API calls on an existing API document.

public boolean authenticate(HttpServletRequest request, HttpServletResponse response);

  • Parameters:
    • request - the http request information
    • response - the http response to write

Related documentation

Download sample plugin

Download the demo plugin for API Authenticator Plugin:
Created by Julieth Last modified by Aadrian on Nov 19, 2024