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_AUTHORIZATION
environment variable:It first checks if token is passed using
Authorization
request header. The value should be of formBearer <token>
. TheAuthorization
header name and token prefixBearer
can be customzied using optionsheader
andprefix
respectively.Note: Some servers don't populate
$_SERVER['HTTP_AUTHORIZATION']
whenAuthorization
header 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
parameter
config:Next it checks if the token is present in query string. The default variable name is
token
and can be customzied by using theparameter
config shown above.