Comments (5)
With $token['value']
works perfect!
Thanks s3b4stian
from csrf-guard.
README.md updated 👍
from csrf-guard.
@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.
Sorry for this mistake! I fix it!
from csrf-guard.
Thanks to you for reporting the bug!
from csrf-guard.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csrf-guard.