Skip to content

A ReactPHP powered Slim Framework test API instance used to verify end-to-end functionality with libraries

License

Notifications You must be signed in to change notification settings

ncryptf/ncryptf-test-api

Repository files navigation

Ncryptf Test API

A Slim framework, ReactPHP, ncryptf capable API written in PHP 7.2

This repository provides a very simple ncryptf API for integration testing, and to serve as a basic implementation example using a PSR-15 compatible frameworks.

It's primary purpose is to serve as a public API for ncryptf libraries to test end-to-end implementations against.

For implementation examples, refer to the IntgrationTest test class in the ncryptf library language.

Language
Java
Kotlin
.Net Core
PHP
Swift
Go

This library is provided as reference material, and is not guaranteed to be updated. Please review direct implementation examples, or other documentation.

Using this software

This API can be implemented using docker simply by running docker-compose up --compress -d. This API will be made available on http://127.0.0.1:8080.

Development

Currently development is done using the built in PHP web server.

export REDIS_HOST=<IP_OF_REDIS>
export ENV=dev
composer install -ovna
php -S [::]:8080 -t ./web

Environment variables

Variable Description
REDIS_HOST The IP address of a Redis 4.0 instance
ENV Set to dev to run the built in PHP web server instead of the ReactPHP server.
ACCESS_TOKEN An optional alphanumeric string to help prevent unauthorized API access.

About

A ReactPHP powered Slim Framework test API instance used to verify end-to-end functionality with libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published