HtdigestAuth

An extension of AuthProvider which is using .htdigest file as store

package

Default

Methods

__construct

__construct() 

Authenticate a user.

authenticate( $arg0,  $arg1) : void

The first argument is a JSON object containing information for authenticating the user. What this actually contains depends on the specific implementation. In the case of a simple username/password based authentication it is likely to contain a JSON object with the following structure:

  {
    "username": "tim",
    "password": "mypassword"
  }
For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.

If the user is successfully authenticated a object is passed to the handler in an \io.vertx.core.AsyncResult. The user object can then be used for authorisation.

Arguments

$arg0

array

$arg1

callable

Creates an instance of HtdigestAuth.

create( $arg0,  $arg1 = null) : \io\vertx\jphp\ext\auth\htdigest\HtdigestAuth
static

param $vertx [Vertx] create($vertx)

Creates an instance of HtdigestAuth by using the given htfile file.

param $vertx [Vertx] param $htfile [string] the existing htfile. create($vertx, $htfile)

Arguments

$arg0

Vertx

$arg1

string

Response

\io\vertx\jphp\ext\auth\htdigest\HtdigestAuth

the created instance of {@link HtdigestAuth}s

Return the currently used realm

realm() : string

Response

string

the realm

Constants

The property name to be used to set the name of the collection inside the config

HTDIGEST_FILE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件