Skip to content
Snippets Groups Projects
Select Git revision
  • 11.x
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
40 results

Plugin

  • Clone with SSH
  • Clone with HTTPS
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.

    CONTENTS OF THIS FILE

    • Introduction
    • Requirements
    • Installation
    • Configuration
    • Maintainers

    INTRODUCTION

    The REST API Access Token module provides a Drupal authentication provider that uses tokens (in headers) as the primary factor of authentication. Additionally module provide signature verification for requests and response cache.

    REQUIREMENTS

    min. PHP 7.3 version

    INSTALLATION

    Install the REST API Access Token module as you would normally install a contributed Drupal module. Enable module in admin panel.

    CONFIGURATION

    1. Navigate to Administration > Extend and enable the module.
    2. Navigate to Administration > Configuration > REST API Access Token and enable 'Enable signature verification' if you need signature verification for each request.
    3. Navigate to Administration > Configuration > REST API Access Token and enable 'Enable cache endpoints by REQUEST-ID (in header)' if you need cacheable endpoints.
    4. Navigate to Administration > Configuration > REST API Access Token and set value of 'Set lifetime of cache endpoints in seconds.'
    5. Navigate to Administration > Configuration > REST API Access Token and set value of 'Set lifetime of auth token in hours.'
    6. If you want to remove other user tokens, please use EventSubscriberInterface and AccessTokenEvents::TOKEN_RESPONSE:
    try {
      $this->tokenRepository->removeOtherUserTokens($token);
    } catch (\Throwable $e) {}
    1. Navigate to Administration > Configuration > REST API Access Token and set API login options: via username or via user mail.

    MAINTAINERS

    TODO

    • unit tests
    • disable auth for specific endpoints / controllers