CSRF
  • Namespace
  • Class
  • Tree

Namespaces

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

Classes

  • CSRFHandler
  • NonceValidator
  • SingleToken

Exceptions

  • InvalidCSRFTokenException

Class SingleToken

Provides convenience and efficiency by lazy loading only one token.

Namespace: Riimu\Kit\CSRF
Copyright: Copyright (c) 2015, Riikka Kalliomäki
License: MIT License
Author: Riikka Kalliomäki riikka.kalliomaki@gmail.com
Located at SingleToken.php

Methods summary

public
# __construct( Riimu\Kit\CSRF\CSRFHandler $csrf )

Creates a new instance of SingleToken.

Creates a new instance of SingleToken.

Parameters

$csrf
The handler used to generate the token
public string
# getToken( )

Returns the generated token.

Returns the generated token.

The token is generated the first time this method is called. Further calls to this method will always return the same token.

Returns

string
The generated token
public string
# __toString( )

Returns the generated token.

Returns the generated token.

Returns

string
The generated token
CSRF API documentation generated by ApiGen