Skip to content

Commit 623865b

Browse files
committed
PAIA auth requires application/x-www-form-urlencoded (#50)
1 parent 366cf10 commit 623865b

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

paia.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ access_token
195195
request header.
196196
callback
197197
: A JavaScript callback method name to return JSONP instead of JSON. The
198-
callback MUST only contain alphanumeric characters and underscores. If a
199-
callback is given, the response content type MUST be `application/javascript`.
198+
callback MUST only contain alphanumeric characters and underscores.
200199
suppress_response_codes
201200
: If this parameter is present, *all* responses MUST be returned with a
202201
200 OK status code, even [request errors](#request-errors).
@@ -217,6 +216,9 @@ Authorization
217216
: MAY be sent to provide an [access token]
218217
Accept-Language
219218
: MAY be sent to indicate preferred languages of textual response fields
219+
Content-Type
220+
: SHOULD be sent for HTTP POST with value `application/json` or
221+
for PAIA core and `application/x-www-form-urlencoded` for PAIA auth.
220222

221223
A OPTIONS preflight request for Cross-Origin Resource Sharing (CORS) MUST
222224
include the cross-origin request headers:
@@ -263,12 +265,20 @@ Allow
263265

264266
## HTTP message body
265267

266-
All POST requests MUST include a HTTP message body in JSON format in UTF-8. The
267-
`Content-Type` request header MUST be sent with value `application/json;
268-
charset=utf-8` or `application/json`. A PAIA auth server SHOULD additionally
269-
accept URL encoded HTTP POST request bodies with content type
270-
`application/x-www-form-urlencoded`. Request encoding ISO-8859-1 MAY be
271-
supported in addition to UTF-8 for these requests.
268+
All POST requests MUST include a HTTP message body.
269+
270+
* For PAIA core the message body MUST be sent in JSON format with content type
271+
`application/json`. A PAIA core server MAY also support message body as URL
272+
encoded query string.
273+
274+
* For PAIA auth the message body MUST be sent as URL encoded query string
275+
with content type `application/x-www-form-urlencoded`. A PAIA auth server
276+
MAY also support message body in JSON.
277+
278+
A PAIA Server MUST also accept the explicit charset UTF8 (content type
279+
`application/json; charset=utf-8` or `application/x-www-form-urlencoded;
280+
charset=utf-8`). A PAIA Server MAY support additional request charsets such as
281+
ISO-8859-1.
272282

273283
## Request errors
274284

@@ -300,8 +310,7 @@ indicate the need of providing a proper access token. The field MAY include a sh
300310
PAIA service with a "realm" parameter:
301311

302312
WWW-Authenticate: Bearer
303-
WWW-Authenticate
304-
: Bearer realm="PAIA Core"
313+
WWW-Authenticate: Bearer realm="PAIA Core"
305314

306315
The following error responses are expected:[^errors]
307316

@@ -1052,7 +1061,7 @@ servicetypes
10521061
This is version **{VERSION}** of PAIA specification, last modified at
10531062
{GIT_REVISION_DATE} with revision {GIT_REVISION_HASH}.
10541063

1055-
Version numbers follow [Semantic Versioning](http://semver.org/)]: each number
1064+
Version numbers follow [Semantic Versioning](http://semver.org/): each number
10561065
consists of three numbers, optionally followed by `+` and a suffix:
10571066

10581067
* The major version (first number) is increased if changes require
@@ -1068,6 +1077,11 @@ consists of three numbers, optionally followed by `+` and a suffix:
10681077
Releases with functional changes are tagged with a version number and
10691078
included at <https://github.com/gbv/paia/releases> with release notes.
10701079

1080+
#### 1.2.0 (2015-04-28) {.unnumbered}
1081+
1082+
* PAIA auth MUST support content type `application/x-www-form-urlencoded`
1083+
to align with OAuth 2.0 (issue #50)
1084+
10711085
#### 1.1.0 (2015-04-21) {.unnumbered}
10721086

10731087
* added mandatory HTTP OPTIONS and optional HTTP HEAD requests

0 commit comments

Comments
 (0)