2017 © Pedro Peláez
 

cakephp-plugin cakephp-soap-auth

CakePHP plugin for authenticating for stateless connexions

image

danger2k7/cakephp-soap-auth

CakePHP plugin for authenticating for stateless connexions

  • Wednesday, May 16, 2018
  • by danger2k7
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 180 % Grown

The README.md

CakePHP SOAP Authenticate plugin

License, (*1)

Plugin containing AuthComponent's authenticate class for authenticating using headers., (*2)

Requirements

  • CakePHP 3.5+

Installation

composer require dynweb-org/cakephp-soap-auth

Usage

In your app's config/bootstrap.php add:, (*3)

// In config/bootstrap.php
Plugin::load('Dynweb/SoapAuth');

or using cake's console:, (*4)

./bin/cake plugin load Dynweb/SoapAuth

Configuration:

Setup AuthComponent:, (*5)

    // In your controller, for e.g. src/Api/AppController.php

Working

The authentication class checks for the token in two locations:, (*6)

  • HTTP_AUTHORIZATION environment variable:, (*7)

    It first checks if token is passed using Authorization request header. The value should be of form Bearer <token>. The Authorization header name and token prefix Bearer can be customzied using options header and prefix respectively., (*8)

    Note: Some servers don't populate $_SERVER['HTTP_AUTHORIZATION'] when Authorization header is set. So it's upto you to ensure that either $_SERVER['HTTP_AUTHORIZATION'] or $_ENV['HTTP_AUTHORIZATION'] is set., (*9)

    For e.g. for apache you could use the following:, (*10)

    RewriteEngine On
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
    
  • The query string variable specified using parameter config:, (*11)

    Next it checks if the token is present in query string. The default variable name is token and can be customzied by using the parameter config shown above., (*12)

The Versions

16/05 2018

dev-master

9999999-dev https://github.com/danger2k7/cakephp-soap-auth

CakePHP plugin for authenticating for stateless connexions

  Sources   Download

MIT

The Requires

 

authentication cakephp soap authenticate stareless

16/03 2017

1.0

1.0.0.0 https://github.com/danger2k7/cakephp-soap-auth

CakePHP plugin for authenticating for stateless connexions

  Sources   Download

MIT

The Requires

 

authentication cakephp soap authenticate stareless