GithubHelp home page GithubHelp logo

Comments (2)

iamkinetic avatar iamkinetic commented on September 24, 2024
  • L'application pourrait utiliser une clef qu'elle passera à l'API au lieu d'un token?
  • L'application pourrait utiliser une clef au lieu d'un login/password pour recevoir un token?

Fred aime bien la deuxième version parce qu'elle demande moins de changement et lui parait plus sécure que la première.

from survip-webapi.

iamkinetic avatar iamkinetic commented on September 24, 2024
  • supporter ça implicitement dans l'ApiClient.
  1. Lorsqu'on vient pour faire une requête, on vérifie si on a les tokens.
  2. Si ce n'est pas le cas, on utilise l'AuthentificationService pour se connecter avec le secretKey et récupérer le token.
  3. Si on a pas de secretKey ou que l'API nous retourne un 401 lors d'authentification, on throw une exception.
  4. Si on a une secretKey et que l'API nous retourne un 200 avec les tokens, on set les tokens dans le singleton de configuration, puis on procède avec la requête.

Il faut donc ajouter :

  • Dans l'API Client:
    • Une nouvelle exception du genre InvalidCredentialApiException
    • Un service d'authentification qui sera appelé automatiquement par BaseSecureService.
  • Dans l'API Prévention :
    • Un nouvelle façon de se connecter via l'API d'authenfication en utilisant un SecretKey au lieu d'un login/password.

from survip-webapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.