Giter VIP home page Giter VIP logo

Comments (5)

playinteractive avatar playinteractive commented on July 20, 2024 2

With $token['value'] works perfect!

Thanks s3b4stian

from csrf-guard.

s3b4stian avatar s3b4stian commented on July 20, 2024 1

README.md updated 👍

from csrf-guard.

peter279k avatar peter279k commented on July 20, 2024

@playinteractive, thank you for your reply. Consider the following code:

<?php

require 'vendor/autoload.php';

use Linna\CsrfGuard;

session_start();

//example:
//create new csrf instance with
//64 token stored
//32 byte token length
$csrf = new CsrfGuard(64, 32);

$token = $csrf->getToken();

var_dump($token);

And the result is like that following bock:

array(2) {
  'name' =>
  string(21) "csrf_24f9e17864471f72"
  'value' =>
  string(64) "a1fa969415c0c02f2375e7809583d6091898569297b046ba9998c4ae462e4c28"
}

According to the usage section in README.md, using $token['token'] to get the token value.

I think it's undefined index token in this $token associate array and it should be change into $token['value'].

I think it's the typo problem. @s3b4stian, you need to consider this and fix this typo in README.md 👍 .

from csrf-guard.

s3b4stian avatar s3b4stian commented on July 20, 2024

Sorry for this mistake! I fix it!

from csrf-guard.

s3b4stian avatar s3b4stian commented on July 20, 2024

Thanks to you for reporting the bug!

from csrf-guard.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.