AttributeSource
: string
in package
Where an attribute's value comes from. Every variant has a real source today; a variant with none (a telephone number the OIDC `phone` scope gates behind its own consent, say) is deliberately absent rather than mapped to an empty value.
An open enum. A value this SDK's copy of the spec does not list decodes to
self::Unknown rather than failing the response it arrived in (CONTRACT.md §27.11 rule 1).
Its own wire spelling is the empty string, which no server value is, so carrying an
unrecognised value back into an update is refused by the server rather than written as a
spelling it never used. A match over these cases needs an Unknown arm.
Table of Contents
Cases
- DisplayName = 'display_name'
- The wire value `display_name`.
- Email = 'email'
- The wire value `email`.
- FamilyName = 'family_name'
- The wire value `family_name`.
- GivenName = 'given_name'
- The wire value `given_name`.
- Groups = 'groups'
- The wire value `groups`.
- Roles = 'roles'
- The wire value `roles`.
- Unknown = ''
- A value this SDK's copy of the spec does not list; see the type's summary.
- Username = 'username'
- The wire value `username`.
Methods
- fromWire() : self
- Parses a wire value into a AttributeSource, mapping an unrecognised one to {@see self::Unknown}.
- toWire() : string
- The wire spelling of this case, for a request body.
Cases
Username
The wire value `username`.
The wire value `email`.
DisplayName
The wire value `display_name`.
GivenName
The wire value `given_name`.
FamilyName
The wire value `family_name`.
Groups
The wire value `groups`.
Roles
The wire value `roles`.
Unknown
A value this SDK's copy of the spec does not list; see the type's summary.
Methods
fromWire()
Parses a wire value into a AttributeSource, mapping an unrecognised one to {@see self::Unknown}.
public
static fromWire(string $value) : self
Never throws. A parse error here would fail the whole response the value arrived in, so
one unrecognised field of one record would take down the page it was on (§27.11 rule 1).
A match over this enum needs an Unknown arm.
Parameters
- $value : string
Return values
selftoWire()
The wire spelling of this case, for a request body.
public
toWire() : string
self::Unknown has none: it stands for a value this SDK never saw, and sending it
back as the empty string would leave the refusal to the server. It raises a ValidationError here instead, before any request is made
(CONTRACT.md §34.2 P12.2(a)). Use ->value to render for a log line.