Documentation

RemoteAuthInterface extends ServiceInterface

Minimal interface for remote authentication.

Implement this as a concrete class and register it using Register::remoteAuth().

Table of Contents

Methods

configure()  : void
Configure the service.
getDetails()  : array<string|int, mixed>|null
Get the user details for a remote UID.
process()  : string|null
Process a remote login, as provided by the external web service.

Methods

configure()

Configure the service.

public static configure(array<string|int, mixed> $config) : void
Parameters
$config : array<string|int, mixed>

getDetails()

Get the user details for a remote UID.

public static getDetails(string $uid) : array<string|int, mixed>|null
Parameters
$uid : string
Return values
array<string|int, mixed>|null —
  • null if the user does not exist, or an array with:
  • uid
  • name
  • username
  • email

process()

Process a remote login, as provided by the external web service.

public static process(array<string|int, mixed> $request) : string|null
Parameters
$request : array<string|int, mixed>

an auth request containing:

  • username
  • password
  • ip
  • user_agent
Return values
string|null —

A string UID on success, null otherwise.

On this page

Search results