Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 2.99 KB

Class_MethodStack.md

File metadata and controls

73 lines (55 loc) · 2.99 KB

MethodStack Composite Class

Contains a list of other AuthenticationMethod instances which will be used to verify requests.

This is useful if your API has several acceptable authentication methods and you want to support them all with a single verify() call.

This class itself implements the AuthenticationMethod interface, so it can be used in place of single instances everywhere.

Instances can be used for authentication: the authenticate() call will always be delegated to the first instance in the stack.

Class Details

Constructor

  • __construct (iterable $methods)
    Takes a list of AuthenticationMethod instances or class names. Class names will be instantiated (which requires them to have a public constructor without required arguments).
    The list may not be empty.

Method Overrides

Extra Methods

  • getMethods (): array
    Returns the contained AuthenticationMethod instances in their original order.