...
The addition of the new field: termsOfServiceVersion
is a backwards compatible change. If an old client calls this service without providing this new field, a default value of ‘0.0.0’ will be used to indicate that the user has agreed to the deprecated ToS. If the user attempts to set a version that is newer than the current version, an error will be returned.
We will also update the POST /login2 API response to include the more information the user’s ToS status:
LoginResponse.json
Code Block | ||
---|---|---|
| ||
{
"title": "LoginResponse",
"description": "Holds a session token used for short-term authentication with Synapse",
"properties": {
"sessionToken": {
"type": "string",
"description": "(deprecated) A token that identifies the user"
},
"accessToken": {
"type": "string",
"description": "A token that authorizes subsequent requests"
},
"acceptsTermsOfUse": {
"type": "boolean",
"description": "When false, the user has not agreed to the currently required version of the ToS. This user will need to agree the the latest ToS by the requirement date. True, if the user has agreed."
},
"lastAgreementDate": {
"type": "string",
"format": "date-time",
"description": "The date/time when the user last agreed to the ToS. Will be null if the user has never agreed to the ToS."
},
"lastAgreementVersion": {
"type": "string",
"description": "The version of ToS that the user last agreed to. Will be null if the user has never agreed to the ToS."
},
"authenticationReceipt": {
"type": "string",
"description": "A valid receipt allows the user to skip extra security checks."
}
}
} |
New ToS APIs
The following will be the new ToS APIs.
Response | URL | Request | Description | Authorization |
---|---|---|---|---|
TermsOfServiceInfo | GET /termsOfUse2/info | none | Get information about the current ToS | Not Required |
TermsOfServiceInfo | POST /termsOfUse2/requirements | TermsOfServiceRequirement | Sets the global ToS requirements. | Only ACT or Admin may make this call. |
|
|
|
| This will be replaced with the POST /login2/ Response body. |
...
Code Block | ||
---|---|---|
| ||
{ "description": "Information about the global ToS Synapse requirements that all users must agree to.", "properties": { "requirementDate": { "type": "string", "format": "date-time", "description": "The date/time when the new ToS requirement will go into effect." }, "minimumTermsOfServiceVersion": { "type": "string", "description": "The minimum semantic version of the ToS that all users must agree to by the provided date. Any user that has agreed to this version, or higher, will be required to agree to the latest version of the ToS after the provided date." } } } |
TermsOfServiceStatus.json This data will be provided in the LoginResponse object.
Code Block | ||
---|---|---|
| ||
{ "description": "The status of a user's ToS agreement", "properties": { "userId": { "type": "string", "description": "The ID of the user." }, "hasAgreedToRequiredTermsOfService": { "type": "boolean", "format": "date-time", "description": "When false, the user has not agreed to the currently required version of the ToS. True, if the user has agreed." }, "lastAgreementDate": { "type": "string", "format": "date-time", "description": "The date/time when the user last agreed to the ToS. Will be null if the user has never agreed to the ToS." }, "lastAgreementVersion": { "type": "string", "description": "The version of ToS that the user last agreed to. Will be null if the user has never agreed to the ToS." } } } |
...