Wiki articles in category How-tos tagged with "authentication"

Showing 1-12 of 12 items.
Created 5 months ago by samdark, updated a month ago by samdark.

Using multiple models in an identity

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.

8 1
2 followers
Viewed: 10 379 times
Version: 2.0
Category: How-tos
Created 11 months ago by AndroideLP, updated 11 months ago by samdark.

How to login from different tables in Yii2

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

5 0
5 followers
Viewed: 18 103 times
Version: 2.0
Category: How-tos
Created 5 years ago by le_top, updated 4 years ago by CeBe.

HOW TO: Use token based authentication

After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.

2 0
9 followers
Viewed: 28 768 times
Version: 1.1
Category: How-tos
Created 5 years ago by hemc, updated 4 years ago by CeBe.

How-To: Create Token Authenticated Web Services

This article is about implementing authentication to Yii based web services.

4 0
16 followers
Viewed: 29 914 times
Version: 1.1
Category: How-tos
Created 5 years ago by Rajith R, updated 4 years ago by Rajith R.

Yii User and Rights Implementation

implementing some features of yii user and rights.

3 0
9 followers
Viewed: 30 474 times
Version: 1.1
Category: How-tos
Created 5 years ago by seenivasan, updated 5 years ago by seenivasan.

Yet another implementation of CPhpAuthManager.

In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...

5 1
7 followers
Viewed: 14 353 times
Version: 1.1
Category: How-tos
Created 6 years ago by biz dev, updated 5 years ago by biz dev.

Integrating HybridAuth directly into Yii without an extension

This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

10 0
16 followers
Viewed: 43 952 times
Version: 1.1
Category: How-tos
Created 6 years ago by Chris83, updated 6 years ago by Chris83.

Kickstart development with Yii-App

I recently created a project called Yii-App on GitHub to kickstart my development of smaller Yii applications. The main goal of the project is to provide a ready-to-use application template that includes my bootstrap extension and many other useful extensions. After reading this article you will be able to use...

14 0
41 followers
Viewed: 34 899 times
Version: 1.1
Category: How-tos
Created 6 years ago by zitter, updated 6 years ago by zitter.

Show captcha after <N> unsuccessfull attempts

In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

13 4
17 followers
Viewed: 25 858 times
Version: 1.1
Category: How-tos
Created 7 years ago by Fran├žois Gannaz, updated 5 years ago by Fran├žois Gannaz.

How to write secure Yii applications

  • Validate the user input (see below for details).
  • Protect (escape) your application output according to context (see below for a few output types, mostly HTML and SQL).
  • Test your application in debug mode.
    Set the constant YII_DEBUG to true (by default, it is defined in index.php) and put alongside error_reporting(E_ALL);. Then errors and warnings will stop the execution an...
80 0
117 followers
Viewed: 260 240 times
Version: 1.1
Category: How-tos
Created 7 years ago by Da:Sourcerer, updated 4 years ago by Da:Sourcerer.

Authenticating against phpass hashes with Yii

  • iteration_count_log2 controls the number of iterations for key stretching. A setting of 8 means the hash algorithm will be applied 2^8 = 256 times. This setting should be kept between 4 and 31.
  • portable_hashes controls whether portable hashes should be used or not. Portable hashes are salted MD5 hashes prefixed by $P$.
22 0
28 followers
Viewed: 31 705 times
Version: 1.1
Category: How-tos
Created 9 years ago by bettor, updated 6 years ago by Stageline.

How to setup RBAC with a php file

In this cookbook I will attempt to explain how to use the lightweight version of Role-Based Access Control using a php file. This version does not use database but a php file and is controlled by CPhpAuthManager class.

24 4
21 followers
Viewed: 71 800 times
Version: 1.1
Category: How-tos