S'authentifier

Le service authentication permet de générer un jeton utilisateur pour un scope donné.

Exemple

L’exemple ci-dessous indique comment générer un jeton utilisateur.


# <CORE_HOST>  URL de base de FlowerDocs Core

curl -X POST "<CORE_HOST>/rest/authentication" \
  -H "Content-Type: application/json" \
  -d '{
  "password": "pwd",
  "scope": "TEST",
  "user": "user"
}'

    @Autowired
    private Authenticator authenticator;

    public void authenticateToScope(String scopeId) throws TechnicalException, FunctionalException
    {
        authenticator.authenticate(scopeId);
    }