Null auth

Component ID

2819341

Component name

Null auth

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

157

Component created

Component changed

Component body

Drupal Null Authentication Provider module

This module is a null authentication provider. Enabling anonymous user access to Drupal 8 REST Resources, using an auto-login method.

WARNING: This module does not control any flood and give auto-login for all requests. Use only in environments with controlled access.

Configuration and usage instructions

There is no specific configuration for this module, it enables automatically a null authentication method. You need to add a _null_auth query parameter to all your requests.

Using the contrib module REST UI, you can enable REST Resources using the Authentication Provider null, remember to enable the specific permissions for the REST Resource to anonymous user.

Steps:

  1. Get the X-CSRF-Token: GET /rest/session/token
    HEADERS:
           - Content-Type: application/json
  2. Create a new user: POST /entity/user?_format=json&_null_auth=1
    HEADERS:
           - Content-Type: application/json
           - X-CSRF-Token: ---
         BODY:
         {
           "name":{
             "value":"userName"
           },
           "mail":{
             "value":"userMail"
           }
         }

Get in touch with us for customizations and consultancy.