Documentation

StandardIntrospectionRequest implements ArrayCopyable, Arrayable, Jsonable Uses ArrayTrait, JsonTrait

Request to Authlete's /api/auth/introspection/standard API.

Interfaces, Classes and Traits

ArrayCopyable
Interface to declare instances can be converted into/from arrays.
Arrayable
Interface to declare that instances can be converted into an array.
Jsonable
Interface to declare that instances can be converted into JSON strings.

Table of Contents

copyFromArray()  : mixed
Copy the content of the given array into this object.
copyToArray()  : mixed
Copy the content of this object into the given array.
fromArray()  : static
Convert an array into an instance of this class.
fromJson()  : static
Convert a JSON string into an instance of this class.
getParameters()  : string
Get the request parameters which comply with the introspection request defined in "2.1. Introspection Request" of RFC 7662.
isWithHiddenProperties()  : bool
Get the flag which indicates whether to include hidden properties associated with the token in the output.
setParameters()  : StandardIntrospectionRequest
Set the request parameters which comply with the introspection request defined in "2.1. Introspection Request" of RFC 7662.
setWithHiddenProperties()  : StandardIntrospectionRequest
Set the flag which indicates whether to include hidden properties associated with the token in the output.
toArray()  : array<string|int, mixed>
Convert this object into an array.
toJson()  : string
Convert this object into a JSON string.

Methods

copyFromArray()

Copy the content of the given array into this object.

public copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

copyToArray()

Copy the content of this object into the given array.

public copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

fromArray()

Convert an array into an instance of this class.

public static fromArray([array<string|int, mixed> $array = null ]) : static

This static function returns a new instance of this class. If $array is null, null is returned.

Parameters
$array : array<string|int, mixed> = null

An array

Return values
static

An instance of this class.

fromJson()

Convert a JSON string into an instance of this class.

public static fromJson(string $json) : static

This static function returns a new instance of this class. If $json is null or the type of $json is not string, null is returned.

Parameters
$json : string

A JSON string.

Return values
static

An instance of this class.

getParameters()

Get the request parameters which comply with the introspection request defined in "2.1. Introspection Request" of RFC 7662.

public getParameters() : string
Tags
see
https://tools.ietf.org/html/rfc7662#section-2.1"

RFC 7662, 2.1. Introspection Request

Return values
string

The request parameters that the introspection endpoint of your authorization server received.

isWithHiddenProperties()

Get the flag which indicates whether to include hidden properties associated with the token in the output.

public isWithHiddenProperties() : bool

Authlete has a mechanism whereby to associate arbitrary key-value pairs with an access token. Each key-value pair has a hidden attribute. By default, key-value pairs whose hidden attribute is true are not embedded in the standard introspection output.

If the withHiddenProperties request parameter is given and its value is true, /api/auth/introspection/standard API includes all the associated key-value pairs into the output regardless of the value of the hidden attribute.

Tags
since
1.10
Return values
bool

true if hidden properties are included in the output.

setParameters()

Set the request parameters which comply with the introspection request defined in "2.1. Introspection Request" of RFC 7662.

public setParameters(string $parameters) : StandardIntrospectionRequest

The following is an example value.

token=pNj1h24a4geA_YHilxrshkRkxJDsyXBZWKp3hZ5ND7A&amp;token_type_hint=access_token

The implementation of the introspection endpoint of your authorization server will receive an HTTP POST request with parameters in the application/x-www-form-urlencoded format. It is the entity body of the request that Authlete's /api/auth/introspection/standard API expects as the value of the parameters request parameter.

Parameters
$parameters : string

The request parameters that the introspection endpoint of your authorization server received.

Tags
see
https://tools.ietf.org/html/rfc7662#section-2.1"

RFC 7662, 2.1. Introspection Request

Return values
StandardIntrospectionRequest

$this object.

setWithHiddenProperties()

Set the flag which indicates whether to include hidden properties associated with the token in the output.

public setWithHiddenProperties(bool $with) : StandardIntrospectionRequest

See the description of isWithHiddenProperties() for details.

Parameters
$with : bool

true to include hidden properties in the output.

Tags
since
1.10
Return values
StandardIntrospectionRequest

$this object.

toArray()

Convert this object into an array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array.

toJson()

Convert this object into a JSON string.

public toJson(int $options) : string
Parameters
$options : int

Options passed to json_encode(). This parameter is optional and its default value is 0.

Return values
string

A JSON string.

Search results