Download the PHP package danger2k7/cakephp-soap-auth without Composer
On this page you can find all versions of the php package danger2k7/cakephp-soap-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danger2k7/cakephp-soap-auth
More information about danger2k7/cakephp-soap-auth
Files in danger2k7/cakephp-soap-auth
Package cakephp-soap-auth
Short Description CakePHP plugin for authenticating for stateless connexions
License MIT
Homepage https://github.com/danger2k7/cakephp-soap-auth
Informations about the package cakephp-soap-auth
CakePHP SOAP Authenticate plugin
Plugin containing AuthComponent's authenticate class for authenticating using headers.
Requirements
- CakePHP 3.5+
Installation
Usage
In your app's config/bootstrap.php add:
or using cake's console:
Configuration:
Setup AuthComponent:
Working
The authentication class checks for the token in two locations:
-
HTTP_AUTHORIZATIONenvironment variable:It first checks if token is passed using
Authorizationrequest header. The value should be of formBearer <token>. TheAuthorizationheader name and token prefixBearercan be customzied using optionsheaderandprefixrespectively.Note: Some servers don't populate
$_SERVER['HTTP_AUTHORIZATION']whenAuthorizationheader is set. So it's upto you to ensure that either$_SERVER['HTTP_AUTHORIZATION']or$_ENV['HTTP_AUTHORIZATION']is set.For e.g. for apache you could use the following:
-
The query string variable specified using
parameterconfig:Next it checks if the token is present in query string. The default variable name is
tokenand can be customzied by using theparameterconfig shown above.