response_type must be id, code, or omitted. Omitted is treated as id.
scope must match /^[\x21\x23-\x5B\x5D-\x7E]+$/ or be omitted.
Allowed character ranges for state and scope taken from RFC 6749: OAuth 2.0.
When state or scope are given as empty strings, should that be treated as omitted? Should it throw an error?
For the “full URI” requirement we should use a PHP Validate filter: FILTER_VALIDATE_URL. I think we enable both FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED to force the “full” part of the requirement.
I am working on this, but documenting here.
me
must be a full URI.client_id
must be a full URI.redirect_uri
must be a full URI.state
must match/^[\x20-\x7E]+$/
or be omitted.response_type
must beid
,code
, or omitted. Omitted is treated asid
.scope
must match/^[\x21\x23-\x5B\x5D-\x7E]+$/
or be omitted.Allowed character ranges for
state
andscope
taken from RFC 6749: OAuth 2.0.When
state
orscope
are given as empty strings, should that be treated as omitted? Should it throw an error?For the “full URI” requirement we should use a PHP Validate filter:
FILTER_VALIDATE_URL
. I think we enable bothFILTER_FLAG_SCHEME_REQUIRED
andFILTER_FLAG_HOST_REQUIRED
to force the “full” part of the requirement.