AXIAM PHP SDK

UmaChallenge
in package

FinalYes

A parsed `WWW-Authenticate: UMA` challenge (UMA 2.0 §3.2, CONTRACT.md §20.3).

Table of Contents

Properties

$asUri  : string|null
$realm  : string|null
$ticket  : Sensitive|null

Methods

__construct()  : mixed
header()  : string
Format a `WWW-Authenticate: UMA` header value (§20.3, emit half).
parse()  : self|null
Parse a `WWW-Authenticate: UMA …` header value (§20.3).

Properties

Methods

__construct()

public __construct([string|null $realm = null ][, string|null $asUri = null ][, Sensitive|null $ticket = null ]) : mixed
Parameters
$realm : string|null = null

The protection realm the resource server named.

$asUri : string|null = null

The authorization server the resource server nominates. Not automatically trusted — see self::parse().

$ticket : Sensitive|null = null

The ticket to exchange — a bearer credential for its 60-second life.

header()

Format a `WWW-Authenticate: UMA` header value (§20.3, emit half).

public static header(string $realm, string $asUri, Sensitive|string $ticket) : string

The resource-server side: having obtained a ticket from umaRequestTicket, tell the caller where to redeem it.

Parameters
$realm : string
$asUri : string
$ticket : Sensitive|string
Return values
string

parse()

Parse a `WWW-Authenticate: UMA …` header value (§20.3).

public static parse(string $header) : self|null

This deliberately does not exchange the ticket. Parsing a challenge and acting on it are separate decisions: the as_uri names an authorization server the caller has not necessarily chosen to trust, and auto-exchanging would send the requesting party's claim_token to whatever host answered the 403. The caller decides.

Parameters
$header : string
Return values
self|null

The parsed challenge, or null when the header is not a UMA challenge.

On this page

Search results