В дополнение к методам аутентификации, предоставляемым Crowdin, вы можете использовать функцию единого входа (SSO) для мгновенной аутентификации ваших пользователей по их существующим именам.
Эта функция доступна только в тарифных планах организации.
Гибридный SSO Crowdin на самом деле является более быстрым способом создания учетной записи переводчика, чем классический SSO, например OAuth или SAML.
Весь упорядоченный процесс работает следующим образом:
If you pass a login name or email to the SSO URL that is already taken at Crowdin, the user will be asked to correct the registration data.
To enable SSO for your projects, go to the account settings page, click on the SSO tab, activate the Enable Single Sign-On option and specify a valid provider’s name.
Below is the list of parameters you can pass to Crowdin for automatic registration. In this step, you will need to pack the data as JSON array before encryption (See the sample integrations in popular programming languages below).
Параметр | Необходим | Тип | По умолчанию | Пример | Примечания |
---|---|---|---|---|---|
user_id | да | число | 12345678901 | A unique identifier for the user (e.g., the user_id in your system). | |
login | да | строка | johnDoe | Crowdin login name. Should match the pattern [a-z,0-9] | |
user_email | да | строка | john.doe@mail.com | Действительный адрес email | |
expiration | да | число | 1406124776 | Valid unix timestamp. Note! Set no more than 30 minutes from the current UTC time. | |
display_name | строка | Джон Доу | Псевдоним или настоящее имя | ||
locale | строка | en_US | ru_RU | Код локали | |
projects | строка | docx-project,csv-project | Разделенный запятыми список идентификаторов проекта Crowdin, к которым переводчик должен изначально иметь доступ | ||
gender | число | 0 | 1 | 2 | 1: мужчина, 2: женщина | |
role | число | 0 | 0 | 1 | 2 | User role in joined projects. 0: translator, 1: proofreader, 2: manager | |
языки | строка | ru,uk,fr | Разделенный запятыми список кодов языка Crowdin к которым пользователь должен иметь доступ. Используется для проектов с умеренной языковой политикой доступа | ||
redirect_to | строка | https://crowdin.com/profile | https://crowdin.com/project/your-project-url | Crowdin URL, куда переводчик должен перенаправиться после регистрации | |
return_crowdin_login | число | 0 | 1 | Вернуть параметр GET crowdin_login (работает в сочетании с параметром redirect_to) |
The output JSON array should look like the following:
{
"user_id":"12345678901",
"login":"johndoe",
"user_email":"john.doe@mail.com",
"display_name":"John Doe",
"locale":"de-DE",
"gender":1,
"projects":"docx-project,csv-project",
"expiration":1406124776,
"role":0,
"redirect_to":"https:\/\/crowdin.com\/project\/docx-project"
}
The JSON created in the previous step must be encrypted using AES 128-CBC, with the first 16 characters of your Crowdin account API key acting as the cipher key, and the last 16 characters as the initialization vector. The encrypted text should be transformed now to Base64 text.
The SSO URL should use the following pattern:
Where:
{ENCRYPTED_STRING} is the Base64 text you created in the previous step.
{CROWDIN_USER_LOGIN} is the login name of your Crowdin account. Note: this must be the same account you used to create the projects you want the translator to have access to.
Мы создали фрагменты кода для большинства основных языков программирования. Не забудьте заменить CROWDIN_USER_LOGIN, _ CROWDIN_USER_API_KEY_ вашей аутентификационной информацией.