Package backend.auth

Class Autenticazione

java.lang.Object
backend.auth.Autenticazione

public class Autenticazione extends Object
This custom service allows authenticating user with JSON File
  • Constructor Details

    • Autenticazione

      public Autenticazione()
  • Method Details

    • login

      public static boolean login(String email, String password)
      This static method execute login verify to JSON File passing credential
      Parameters:
      email - of user
      password - of user
      Returns:
      true or false if login executes with no error
    • register

      public static boolean register(String nome, String cognome, String email, String password, String intestatarioCarta, String CVV, String scadenza, String numeroCarta, double saldo)
      This method allow to registration user-passing data to be written on JSON File and check if user already exists
      Parameters:
      nome - of user
      cognome - of user
      email - of user
      password - of user
      intestatarioCarta - of credit card
      CVV - of credit card
      scadenza - of credit card
      numeroCarta - of credit card
      saldo - of user
      Returns:
      true or false its depend on if registration operation executed successfully