【问题标题】:Authentication header Vs Authorization header?身份验证标头与授权标头?
【发布时间】:2018-06-21 16:37:27
【问题描述】:

我在一个 Web 项目中找到了这段代码:

const customHeaders = new HttpHeaders({
      'clientId': env.apiKey,
      'Authorization': `Bearer ${authorization}`,
      'Authentication': `Bearer ${authentication}`
});
return this.http.get<UserInfo>(`${env.baseApi}/login`, { headers: customHeaders });

我知道 Spring Security 中的标题“Authorization”,但与标题“Authentication”有什么区别? 为了获得最佳实践,我们应该同时使用两者吗?

【问题讨论】:

  • 找不到标头Authentication,例如看Wikipedia
  • @dur,我没有了,这就是我问这个问题的原因。我在这里问问题之前已经搜索过。

标签: authentication spring-security header


【解决方案1】:

Authentication 是自定义标头。是不是官方标头。

【讨论】:

    猜你喜欢
    • 2018-01-26
    • 2015-05-05
    • 2012-10-02
    • 1970-01-01
    • 2011-04-15
    • 2021-03-19
    • 2019-09-24
    • 2015-09-13
    • 2018-03-04
    相关资源
    最近更新 更多