Tornar-se um Fornecedor SSO

In addition to the authentication methods provided by Crowdin, you can use the Single Sign-On (SSO) feature to authenticate your users instantly with their existing usernames.

Este recurso, somente está disponível nos planos de organização.

Crowdin hybrid SSO is a faster way to create the translator account than classic SSO like OAuth or SAML.

Todo o processo simplificado, funciona da seguinte maneira:

  1. Ativa o ISU na tua conta e copia a chave API da tua conta.
  2. Create a special URL in your system that redirects a translator to Crowdin. This URL will contain the translator’s authentication information and the API key you received earlier as URL parameters encrypted with AES.
  3. O Crowdin usa estes parâmetros para criar uma conta para o tradutor e redireciona para a página desejada. Por exemplo, os tradutores podem ser redirecionados, imediatamente, para o editor de tradução para começar a trabalhar.
  4. The translator receives an email with instructions on activating the account and must agree to Crowdin’s Terms of Service and Privacy Policy.
Note: Before referring a user to Crowdin, please include a warning that you are sending the translator’s encrypted personal information to the outside party.

If you pass a login name or email to the SSO URL already taken at Crowdin, the user will be asked to correct the registration details.

Ativar o Início de Sessão Único (ISU(SSO))

To enable SSO for your projects, follow these steps:

  1. Go to Account Settings > SSO.
  2. Select Enable single sign-On.
  3. Specify a valid provider’s name.
  4. Click Save.

Parâmetros de URL do ISU

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 a JSON array before encryption (See the sample integrations in popular programming languages below).

Parâmetro Obrigatório Tipo Padrão Exemplo Notas
user_id sim int 12345678901 A unique identifier for the user (e.g., the user_id in your system).
login sim string johndoe Crowdin login name. Should match the pattern [a-z,0-9]
user_email sim string john.doe@mail.com Endereço de email válido
expiração sim int 1406124776 Valid unix timestamp.
Note! Set no more than 30 minutes from the current UTC time.
display_name string John Doe Pseudo ou nome real
distrito string en_US pt_PT Código de localidade
projetos string docx-project,csv-project Uma lista separada por vírgula de identificadores de projeto do Crowdin que o tradutor deve, inicialmente, ter acesso
género int 0 1 | 2 1: masculino, 2: feminino
função int 0 0 | 1 | 2 User role in joined projects. 0: translator, 1: proofreader, 2: manager
idiomas string ro,uk,fr Comma separated list of Crowdin language codes the user should have access to. Usado para projetos com política moderada de acesso a idiomas
redirect_to string https://pt.crowdin.com/profile https://pt.crowdin.com/project/url-do-teu-projeto O URL do Crowdin onde o tradutor deve pousar após o registo
return_crowdin_login int 0 | 1 Retorna o parâmetro GET crowdin_login (funciona em combinação com o parâmetro 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"
}

Encriptar a Informação

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:

https://crowdin.com/join?h={ENCRYPTED_STRING}&uid={CROWDIN_USER_LOGIN}

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.

Exemplos de integração

We’ve created the code snippets for the most major programming languages. Remember to replace CROWDIN_USER_LOGIN and CROWDIN_USER_API_KEY with your personal authentication information.

Este artigo foi útil?