Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu

Simple Applications Access API

Simple Applications Access API

$4.99

Out of stock

Category: Source Code Generators
  • Description

Description

This is a Simple Applications Access API Generator. With this tool, you can create Applications and the necessary properties.

Applications Access – Data Model

The Simple Applications Access offers small database where you can keep the keys that will authenticate your APIs. It is not intended to be used on the broad public. You could deploy it on your local host, for example. Nevertheless, a DEMO version is deployed on https://programtom.com/Applications_Access/.

It has Simple model fields

  1. User Friendly Name
  2. GUID – (auto generated) globally unique identifier
  3. Secret for verifying requests

The secret must never participate in any request. An additional pair, derived by using is the way to authenticate and verify requests. Demo Code Snippets will be available soon.

PHP Version – Package Files

.htaccess
admin\.htaccess
admin\com\programtom\admin\dao\BannedIpDao.php
admin\com\programtom\admin\dao\createDB.php
admin\com\programtom\admin\dao\DB.php
admin\com\programtom\admin\dao\LoginsDao.php
admin\com\programtom\admin\dao\QueryResult.php
admin\com\programtom\admin\dao\UserDao.php
admin\com\programtom\admin\dao\UserDaoExt.php
admin\com\programtom\admin\model\BannedIp.php
admin\com\programtom\admin\model\Logins.php
admin\com\programtom\admin\model\User.php
appLocalizations.php
com\programtom\Applications_Access\dao\createDB.php
com\programtom\Applications_Access\dao\DB.php
com\programtom\Applications_Access\dao\QueryResult.php
com\programtom\Applications_Access\dao\SomeApplicationDao.php
com\programtom\Applications_Access\dao\Util.php
com\programtom\Applications_Access\model\SomeApplication.php
constants.php
drawer.php
fest.json
index.php
isLogged.php
lang\en.json
lang\en.php
loadingBody.php
login.php
loginBody.php
logout.php
main.php
mainBody.php
register.php
registerBody.php
RemoteAddress.php
res\192.png
res\512.png
someApplication\addedit.php
someApplication\deletestuff.php
someApplication\index.php
sw.js
template.php
TermsAndConditions.php
TermsAndConditionsBody.php

Files that you need to change

You’ll probably need to update the following files:

  • .htaccess. Access to hidden models to the models and to the data administration should be visible only to your IP address
  • DB.php – The app uses simple SQLite Database. You’ll most likely need to update the path to the file. The Database will be created when you execute the createDB.php script

Applications Access – Authentication

Any functionality theoretically could be wrapped up in a separate application. Many of these applications may have similar characteristics. So, the main idea of the GUID field – to associate – to what functionality of the whole app – the module is storing data. The secret should never be shared – to anyone – not in charge of the concrete app. It is the key to derive authenticated requests from.

Client Server App – Request

Here is a Simple Example of a curl POST HTTP Request to a service (callMyFunction.php):

function myFunction($param1, $param2) {
$appGUID = “my_guid_of_an_app”;
$secretForVerifingRequests = “b54321723-1234-3333-5431-1627444234d9”;//should be secret and app specific

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, ‘https://myinternalhost.com/my_internal_module/myFunction.php’);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_SSL_VERIFYSTATUS, 0);

curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLINFO_HEADER_OUT, 0);

$params = [];
$params[‘appGUID’] = $appGUID;
$params[‘requestTimestamp’] = “” . time();
$params[‘verifyRequest’] = hash(‘sha512’, $params[‘requestTimestamp’] . $secretForVerifingRequests);
$params[‘customID’] = hash(‘sha512’, $param1. $param2);

curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));

$response = curl_exec($ch);
return json_decode($response);
}

Server Side Handling

myFunction.php:

if ($_SERVER[‘REQUEST_METHOD’] === ‘POST’) {

$appGUID = filter_input(INPUT_POST, ‘appGUID’);
$requestTimestamp = filter_input(INPUT_POST, ‘requestTimestamp’);
$verifyRequest = filter_input(INPUT_POST, ‘verifyRequest’);
$customID = filter_input(INPUT_POST, ‘customID’);

// Because the same functionality may be available to multiple apps – app selection should be applied

$apps = $appDao->filter(‘GUID’, $appGUID, 1, 0, ”)->list;

if (sizeof($apps) > 0) {

$vvv = hash(‘sha512’, $requestTimestamp . $apps[0]->secretForVerifyingRequests);

if ($vvv === $verifyRequest) {

// — search for the $customID or execute any logic needed – with any additional parameters passed with the request

}  }  }

Related products

  • Flutter App Builder

    PoC Flutter App Builder – Vaadin Spring Boot App

    $8.99
    Add to cart
  • Navigation & App Routing - Web, React, Angular, Vaadin, Flutter

    App Routing – Code Snippets Generator [BETA]

    $10.99
    Add to cart
  • App Builder + Code Generation - Spring Micro Service - Vaadin App

    App Builder + Code Generation – Spring Micro Service – Vaadin App

    $199.00
    Add to cart
  • License for - TranslateApp - Version - All - Executable Build

    License for – TranslateApp – Version – All – Executable Build

    $60.00
    Read more

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (87)
    • Flutter Apps (26)
    • GPT (4)
    • Java (39)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (36)
    • Utils (15)
    • Vaadin 24+ (28)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Post Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)