Wiki articles tagged with "authentication"

Showing 1-3 of 3 items.

JWT authentication tutorial

Created 3 years ago by Allan Jensen, updated 3 years ago by Allan Jensen.

JWT is short for JSON Web Token. It is used eg. instead of sessions to maintain a login in a browser that is talking to an API - since browser sessions are vulnerable to CSRF security issues. JWT is also less complicated than setting up an OAuth authentication mechanism.

13 0
8 followers
Viewed: 163 818 times
Version: 2.0
Category: Tutorials

Using multiple models in an identity

Created 6 years ago by samdark, updated 2 months ago by Néstor Acevedo.

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

9 2
5 followers
Viewed: 36 730 times
Version: 2.0
Category: How-tos

How to login from different tables in Yii2

Created 6 years ago by AndroideLP, updated 4 years ago by lenovo.

The Problem: Yii2 utilizes by default UserIdentity configured in config/web.php for connection, this object apply one table to authentication ('identityClass' => 'app\panel\models\User'). How to authentication from diferent tables? Solution: Create instances in web.php to uses UserIdentify. eg:

5 0
6 followers
Viewed: 64 335 times
Version: 2.0
Category: How-tos