The following schemas represent the request and response messages used by the authentication service.
The authentication service exposes a login operation. The following pair of schemas defines the request and response messages it deals with.
The request schema represents a login request message that allows us to validate a user's credentials, and is coded as follows:
{ "$schema": "http://json-schema.org/draft-03/schema#", "$content_type": "application/vnd.ccm.login.req.v1+json", "type": "object", "additionalProperties": false, "properties": { "username": { "type":"string", "required": true }, "password": { "type":"string", "required": true } } }
The response schema represents the response to a login request, including a token that can be used to perform authenticated operations, and is coded as follows:
{ "$schema": "http://json-schema.org/draft-03/schema#", "$content_type": "application/vnd.ccm.login.res.v1+json", "type": "object", "additionalProperties": false, "properties": { "success": { "type":"boolean", "required": true }, "authentication_token": { "type":"string", "required": true } } }
Another operation exposed by the authentication service is logout. The following two schemas represent the request and response messages the logout operation works with.
A logout request message is defined by the following schema:
{ "$schema": "http://json-schema.org/draft-03/schema#", "$content_type": "application/vnd.ccm.logout.req.v1+json", "type": "object", "additionalProperties": false, "properties": { "authentication_token": { "type":"string", "required": true } } }
The following schema represents the response after a logout operation has been attempted:
{ "$schema": "http://json-schema.org/draft-03/schema#", "$content_type": "application/vnd.ccm.logout.res.v1+json", "type": "object", "additionalProperties": false, "properties": { "success": { "type":"boolean", "required": true } } }
3.129.249.92