CSRF
  • Namespace
  • Class
  • Tree

Namespaces

  • PHP
  • Riimu
    • Kit
      • CSRF
        • Source
        • Storage

Classes

  • HeaderSource
  • PostSource

Interfaces

  • TokenSource

Class HeaderSource

Looks for the token sent in request headers.

Riimu\Kit\CSRF\Source\HeaderSource implements Riimu\Kit\CSRF\Source\TokenSource
Namespace: Riimu\Kit\CSRF\Source
Copyright: Copyright (c) 2014, Riikka Kalliomäki
License: MIT License
Author: Riikka Kalliomäki riikka.kalliomaki@gmail.com
Located at Source/HeaderSource.php

Methods summary

public
# __construct( string $headerName = 'X-CSRF-Token' )

Creates a new instance of HeaderSource.

Creates a new instance of HeaderSource.

Parameters

$headerName
Case insensitive name of the header
public string|false
# getRequestToken( )

Returns the token sent in the request or false if none was found.

Returns the token sent in the request or false if none was found.

Returns

string|false
The sent token or false for none

Implementation of

Riimu\Kit\CSRF\Source\TokenSource::getRequestToken()
protected array
# getRequestHeaders( )

Returns headers provided in the request as is.

Returns headers provided in the request as is.

Returns

array
Associative array of request headers
protected array
# getServerHeaders( )

Returns the server data array with header information.

Returns the server data array with header information.

Returns

array
Server data array
CSRF API documentation generated by ApiGen