当前位置:网站首页>Go practice -- use JWT (JSON web token) in golang
Go practice -- use JWT (JSON web token) in golang
2022-07-03 05:12:00 【Jiangnan - crossing the river with a reed】
Life is more than enough , continue go go go !!!
I wrote about golang How to use cookie The blog of :
actual combat –go Use in cookie
Today, let's give you a brief introduction golang How to use token, Of course, we should rely on it github Excellent open source library on .
First , To figure out a problem ,token、cookie、session The difference between .
##token、cookie、session The difference between
Cookie
Cookie Always save in the client , Press the storage location in the client , Divisible memory Cookie And the hard disk Cookie.
Memory Cookie Maintained by the browser , Save in memory , The browser closes and disappears , Its existence is short . Hard disk Cookie Save it on your hard drive , There is an expiration time , Unless the user manually cleans or runs out of time , Hard disk Cookie It won't be deleted , Its existence is long term . therefore , According to existence time , It can be classified as non-persistent Cookie And persistent Cookie.
cookie It's a very specific thing , It refers to a kind of data that can be stored permanently in the browser , It's just a data storage function implemented by browser .
cookie Generated by the server , Send it to the browser , Browser handle cookie With key-value Save form to a text file in a directory , The next time you request the same website, you will send the cookie Send to the server . because cookie It's on the client side , So browsers add some restrictions to make sure cookie Will not be used maliciously , It doesn't take up too much disk space at the same time , So for each domain cookie The quantity is limited .
Session
session from
边栏推荐
- Silent authorization login and registration of wechat applet
- ZABBIX monitoring of lamp architecture (2): ZABBIX basic operation
- sql语句模糊查询遇到的问题
- Source insight garbled code solution
- Keepalived热备与HAProxy
- JQ style, element operation, effect, filtering method and transformation, event object
- Review the configuration of vscode to develop golang
- Technical analysis of qianyuantong multi card aggregation router
- Compile and decompile GCC common instructions
- Notes | numpy-09 Broadcast
猜你喜欢
RT thread flow notes I startup, schedule, thread
How to connect the network: Chapter 1 CSDN creation punch in
微服务常见面试题
How to connect the network: Chapter 2 (Part 1): a life cycle of TCP connection | CSDN creation punch in
es7创建索引容易犯的错误
"Hands on deep learning" pytorch edition Chapter II exercise
Interface frequency limit access
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
Do you know UVs in modeling?
随机推荐
Wechat applet distance and map
1110 complete binary tree (25 points)
Based on RFC 3986 (unified resource descriptor (URI): general syntax)
Redis Introduction et explication des types de données
动态规划——相关概念,(数塔问题)
appium1.22.x 版本後的 appium inspector 需單獨安裝
leetcode860. Lemonade change
JS scope
JS function algorithm interview case
Chapter II program design of circular structure
BTC-密码学原理
Yolov5 input (I) -- mosaic data enhancement | CSDN creative punch in
Burp suite plug-in based on actual combat uses tips
JS dynamic table creation
Huawei personally ended up developing 5g RF chips, breaking the monopoly of Japan and the United States
Webapidom get page elements
The consumption of Internet of things users is only 76 cents, and the price has become the biggest obstacle to the promotion of 5g industrial interconnection
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
Redis 入门和数据类型讲解
Gbase8s composite index (I)