sminnee / silverstripe-apikey

API Key management for SilverStripe
7 stars 17 forks source link

SilverStripe API Key

Build Status codecov

This module provides a way of creating an managing API keys within SilverStripe. This can be useful for building RESTful and other APIs.

Requirements

Installation

composer require sminnee/silverstripe-apikey

How it works

Regular use

For regular module usage, use the RequestMiddleware class. The configuration to apply it is in this module's apikey.yml, but is commented out.

Copy the configuration and add it to your mysite/_config/apikey.yml file.

This will protect all of your frontend routes.

GraphQL

The GraphQL authenticator will work separately from the RequestMiddleware. If using this module for GraphQL, you will probably want to disable the RequestMiddleware. If you run both at the same time you will find that:

Limitations

Status

This should be considered experimental for now, and used with care. It has not received a security audit.