Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • DB
  • MockFactory
  • MockObject
  • MockState
  • PermissivePolicyDecisionPoint
  • StaticPolicyDecisionPoint
  • Overview
  • Namespace
  • Class
  • Deprecated

Class StaticPolicyDecisionPoint

A PDP implementation that returns a custom response. For testing purposes

Nethgui\Test\Tool\StaticPolicyDecisionPoint implements Nethgui\Authorization\PolicyDecisionPointInterface, Nethgui\Authorization\AccessControlResponseInterface
Namespace: Nethgui\Test\Tool
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Codecoverageignore
Located at Test/Tool/StaticPolicyDecisionPoint.php
Methods summary
public
# __construct( boolean $response )

Parameters

$response
public AccessControlResponseInterface
# authorize( string|object $subject, string|object $resource, string|object $action )

Authorize the $subject to perform $action on $resource

Authorize the $subject to perform $action on $resource

Each parameter may implement AuthorizationAttributesProviderInterface

Parameters

$subject
Subject
$resource
resource requested
$action
action to be performed

Returns

AccessControlResponseInterface

Api

Implementation of

Nethgui\Authorization\PolicyDecisionPointInterface::authorize()
public Nethgui\Exception\AuthorizationException
# asException( integer $identifier )

Prepare an exception object with the response informations.

Prepare an exception object with the response informations.

Parameters

$identifier
The exception unique identifier

Returns

Nethgui\Exception\AuthorizationException

Api

Implementation of

Nethgui\Authorization\AccessControlResponseInterface::asException()
public integer
# getCode( )

Response numeric code.

Response numeric code.

Returns

integer
0 if granted, positive otherwise

Api

Implementation of

Nethgui\Authorization\AccessControlResponseInterface::getCode()
public string
# getMessage( )

Response explanation.

Response explanation.

Returns

string

Api

Implementation of

Nethgui\Authorization\AccessControlResponseInterface::getMessage()
public boolean
# isDenied( )

This is the dual of isAllowed().

This is the dual of isAllowed().

Returns

boolean
TRUE, if access is denied FALSE otherwise

See

isGranted()

Api

Implementation of

Nethgui\Authorization\AccessControlResponseInterface::isDenied()
public boolean
# isAllowed( )

TRUE if the access is granted.

TRUE if the access is granted.

Returns

boolean
TRUE, if granted, FALSE otherwise.

Api

Implementation of

Nethgui\Authorization\AccessControlResponseInterface::isAllowed()
Nethgui Framework API documentation generated by ApiGen