会话 ID 与令牌 [英] Session ID vs token

查看:23
本文介绍了会话 ID 与令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在构建一个 iOS 应用程序,该应用程序将使用我们的 API 与我们现有的网站进行交互.该网站使用标准 PHP 会话来跟踪登录用户.

We are building an iOS application that will use our API to interact with our existing website. The website uses standard PHP sessions to keep track of logged in users.

我们如何处理应用程序中的用户登录?我们是否像在网站上那样使用会话 + 会话 ID 或其他方法?

How do we handle user log-in in the application? Do we use sessions + session ID's as we are doing on the website or another method?

我已经看到很多人提到 API 令牌,但我还没有找到解释会话 ID 和 API 令牌之间区别的可靠描述,或者 API 令牌只是会话 ID 的另一个名称?

I've seen API tokens mentioned a lot but I've yet to find a solid description that explains the difference between Session ID's and API tokens, or is an API token just another name for a session ID?

推荐答案

Sessions 基本上是在访问令牌被确认后使用应用程序时进行授权.这在这篇文章中有很好的介绍.什么是 API 令牌

Sessions are basically for authorization when using an application after access tokens have been confirmed. This has been well covered in this post. What is an API token

这篇关于会话 ID 与令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆