Home > PHP Framework > YII > How do Vue and Yii work together?

How do Vue and Yii work together?

Guanhui
Release: 2020-06-10 16:15:26
Original
3950 people have browsed it

How do Vue and Yii work together?

How do Vue and Yii work together?

Vue and Yii can work together through front-end and back-end separation. Yii is a back-end Web framework developed based on PHP, which can be used to write Api interfaces, while Vue is a front-end framework, used to write the front-end and pass Call the Api interface and backend for data interaction, and use JWT for permission and identity authentication.

JWT

Json web token (JWT) is an open standard based on JSON (RFC 7519) for transmitting claims between network application environments. .The token is designed to be compact and secure, especially suitable for single sign-on (SSO) scenarios on distributed sites. JWT claims are generally used to transfer authenticated user identity information between identity providers and service providers. In order to obtain resources from the resource server, you can also add some additional declaration information necessary for other business logic. The token can also be directly used for authentication or encrypted.

JWT Advantages

  • Because of the versatility of json, JWT can be supported across languages, such as JAVA, JavaScript, NodeJS, PHP and many other languages.

  • Because of the payload part, JWT can store some non-sensitive information necessary for other business logic in itself.

  • Easy to transmit, the composition of jwt is very simple , the byte occupancy is very small, so it is very easy to transmit.

  • It does not need to save session information on the server side, so it is easy to apply extensions

Recommended tutorial: "Yii Tutorial"

The above is the detailed content of How do Vue and Yii work together?. For more information, please follow other related articles on the PHP Chinese website!

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