合约的多空比是什么比?是人数比?还是资金量比?这个基本概念很多人都弄错了,不管你玩不玩合约,这个概念都值得你理解。
博客
-
诞生于金融危机的比特币,为什么现在还没有“避险属性”?
恐慌情绪集中爆发,美股四次熔断,全球性金融危机好像已经来了,在这种动荡的时候,关于比特币是否具有「避险属性」的讨论声增加了不少,那到底有没有“避险属性”?
-
我怎么看币圈交易所 100% 准备金?
聊一聊交易所的 100% 准备金,对于交易所来说是否有必要,对于用户来说是否有意义,以及大家对此有哪些不同的观点。
-
三分钟讲清楚比特币
这两年给太多人讲什么是比特币了,但是总是徘徊在讲不清楚和太复杂之间,最近尝试了很多次,终于可以再三分钟讲清楚比特币了。
-
BM Daniel Larimer 国会演讲
BM Daniel Larimer 2020-01-31 在国会演讲完整版 The Future of Money, Governance, and the Law。
这个视频值得看,因为 BM 表现很紧张,竟然忘词了……哈哈哈
-
【视频】如何读比特币白皮书 — 概述
教你如何读比特币白皮书。
-
【视频】2020 年输出计划
我是金马,这是我在 2020 年做的输出计划。
-
【视频】金马带你体验李笑来 BOX 定投践行群
很多人对李笑来老师 BOX 定投践行群感兴趣,无奈年费太贵。
今天我用视频的方式帮你一瞥践行群里都有啥。 -
【视频】区块链安全 | 币圈富人如何保存保存私钥和助记词呢?
【区块链安全】币圈富人如何保存保存私钥和助记词呢?
到底有没有一种靠谱的方式?
抄在纸上?
刻在铁板上?
存在互联网?怎么平衡安全性和便捷性?
给你讲讲币圈富人怎么存。
-
一分钟讲清楚 Authentication 和 Authorization
我们在看文档经常会遇到这两个单词,但是很多人对这两个单词的理解有些模糊,所以我今天给大家简单介绍一下,以后读文档会更舒服一些。
Authentication 一般指身份验证,又称“验证”、“鉴权”,是指通过一定的手段,完成对用户身份的确认。 Authorization 一般是授权、委托的意思,向…授予职权或权力许可,批准等意思。
所以你可以看一下 Laravel 的文档
- Authentication ,主要讲的是和登录相关的内容。
- Authorization ,主要讲的是权限相关的内容(注意,Gates 和 Policies 都必须是在用户登录后才有意义,如果没有登录态,直接返回 false)。
讲完这个在说一说对应的 Http Status Code:
- Authentication:未登录的时候调用需要登录的接口,一般使用 401 Unauthorized。
- Authorization:登录后请求没有权限的接口,一般使用 403 Forbidden。
那么肯定有同学问了,为什么 401 是 Unauthorized 而不是 Unautheticated 呢?这不是坑人吗?事实上,参考 RFC,好像确实是弄错了。
我贴一篇解释,秒懂:原文链接
There’s a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate.
This is a response generally returned by your web server, not your web application.
It’s also something very temporary; the server is asking you to try again.
So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401.
Receiving a 403 response is the server telling you, “I’m sorry. I know who you are–I believe who you say you are–but you just don’t have permission to access this resource. Maybe if you ask the system administrator nicely, you’ll get permission. But please don’t bother me again until your predicament changes.”
In summary, a 401 Unauthorized response should be used for missing or bad authentication, and a 403 Forbidden response should be used afterwards, when the user is authenticated but isn’t authorized to perform the requested operation on the given resource.