...
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 LoginResponse object returned by: POST /login2 to include the more information the user’s ToS status. The UI can use this information to show a message to the user when they need to agree to new ToS.
New ToS APIs
The following will be the new ToS APIs. These new services will be added under the “Authentication Services”
Response | URL | Request | Description | Authorization |
---|---|---|---|---|
TermsOfServiceInfo | GET /termsOfUse2/info | none | Get information about the current ToS | Not Required |
TermsOfServiceInfo | POST PUT /termsOfUse2/requirements | TermsOfServiceRequirement | Sets the global ToS requirements. | Only ACT or Admin may make this call. |
TermsOfServiceStatus | POST GET /termsOfUse2/status | none | Get the current user’s ToS status. Used to determine if the user needs to agree to the new ToS | This will be replaced with the POST /login2/ Response bodycall needs to work with a standard auth token in the header to identify the user but the caller does know the ID of the user yet. |
Note: The starting TermsOfServiceRequirement will be set with minimumTermsOfServiceVersion=0.0.0
and requirementDate=1/1/2011
. All existing users that have agreed to the exiting ToS will meet the starting requirements. This means ACT will need to set the new requirements before users will be required.
...
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."
}
}
} |
...