Home > Backend Development > PHP Tutorial > When writing the app interface in PHP, the token is given to the app client at that step.

When writing the app interface in PHP, the token is given to the app client at that step.

WBOY
Release: 2016-09-03 00:14:11
Original
1252 people have browsed it

When using PHP to write an app interface, what are the pros and cons of each step when the token is given to the app client? For example, obtaining the token before requesting any interface
The other is to give the token after the user initiates a login request and log in
What are the pros and cons of each? Pros and cons, the most common methods

Reply content:

When using PHP to write an app interface, what are the pros and cons of each step when the token is given to the app client? For example, obtaining the token before requesting any interface

The other is to give the token after the user initiates a login request and log in
What are the pros and cons of each? Pros and cons, the most common methods

Which step?

The essence of login is to obtain a token

token
, and the get_access_tokeninterface is the login operation.Except the get_access_token
interface, all interfaces should pass the access_tokenwhen calling

You need to perform a login authorization operation to obtain the login token. After successful login, you need to bring the token in the header or cookie to access each interface

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template