Skip to content
Permalink
Browse files

Attributes: change to more friendly name

  • Loading branch information...
f3l1x committed Sep 22, 2017
1 parent 2da0986 commit 8baa2a5d6e4d786063cd0d5c39c60892a2e5ff25
Showing with 5 additions and 5 deletions.
  1. +4 −4 src/AutoBasePathMiddleware.php
  2. +1 −1 src/SecurityMiddleware.php
@@ -14,9 +14,9 @@ class AutoBasePathMiddleware extends BaseMiddleware
{
// Attributes in ServerRequestInterface
const ATTR_ORIG_PATH = 'C-Orig-Path';
const ATTR_BASE_PATH = 'C-Base-Path';
const ATTR_PATH = 'C-Path';
const ATTR_ORIGINAL_PATH = 'contributte.original.path';
const ATTR_BASE_PATH = 'contributte.base.path';
const ATTR_PATH = 'contributte.path';
/**
* @param ServerRequestInterface $psr7Request
@@ -62,7 +62,7 @@ public function __invoke(ServerRequestInterface $psr7Request, ResponseInterface
// Update request with new path (fake path) and also provide new attributes
$psr7Request = $psr7Request
->withAttribute(self::ATTR_ORIG_PATH, $uri->getPath())
->withAttribute(self::ATTR_ORIGINAL_PATH, $uri->getPath())
->withAttribute(self::ATTR_BASE_PATH, $basePath)
->withAttribute(self::ATTR_PATH, $newPath)
->withUri($uri->withPath($newPath));
@@ -13,7 +13,7 @@ class SecurityMiddleware extends BaseMiddleware
{
// Attributes in ServerRequestInterface
const ATTR_IDENTITY = 'C-Identity';
const ATTR_IDENTITY = 'contributte.identity';
/** @var IAuthenticator */
private $authenticator;

0 comments on commit 8baa2a5

Please sign in to comment.
You can’t perform that action at this time.