Obtain Access Key from CSAS/Erste
Find a file
CyberVitexus da7f6302f2 fix: remove --ipc=host to prevent faked-sysv collision in parallel builds
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-13 12:28:08 +01:00
.github Migrace na Debian PHP autoloader systém 2026-03-03 23:31:36 +01:00
bin Mailer functionality added 2025-03-11 17:36:14 +01:00
db/migrations update for php-csas-accountsapi v0.7.1+ 2025-03-27 20:01:48 +01:00
debian fix: remove --ipc=host to prevent faked-sysv collision in parallel builds 2026-03-13 12:28:08 +01:00
docs Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
i18n v0.2.0 release 2025-03-11 18:11:19 +01:00
libexec Enhances refresh token error handling 2025-09-30 17:06:50 +02:00
src Improves DeveloperPortalImporter and adds JSON example method 2025-09-30 17:09:16 +02:00
tests Improves DeveloperPortalImporter and adds JSON example method 2025-09-30 17:09:16 +02:00
.gitignore Update instructions, add .gitignore entry, and lock dependencies 2025-10-01 17:15:16 +02:00
.php-cs-fixer.dist.php add connection credentials values on token page 2025-03-14 13:26:52 +01:00
app-screenshot.png Readme Update 2025-03-06 14:05:37 +01:00
apps-screenshot.png Readme Update 2025-03-06 14:05:37 +01:00
CHANGELOG.md Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
composer.json Removes version key from composer.json 2025-09-30 20:39:26 +02:00
composer.lock Migrace na Debian PHP autoloader systém 2026-03-03 23:31:36 +01:00
demo_error_handling.php Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
example-import.json Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
example.env csas-access-token commandline tool introduced 2025-02-24 17:47:03 +01:00
LICENSE Json output format support added 2025-03-31 15:52:44 +02:00
Makefile Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
phinx-adapter.php Initial Commit 2025-02-13 18:12:13 +01:00
phpstan-default-baseline.neon Initial Commit 2025-02-13 18:12:13 +01:00
phpstan-default.neon.dist Initial Commit 2025-02-13 18:12:13 +01:00
phpunit.xml Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
README.md Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
test-launcher.php Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
token-screenshot.png Readme Update 2025-03-06 14:05:37 +01:00
verify_tests.php Add comprehensive test suite for CSASAuthorize package 2025-09-29 00:31:51 +02:00
WARP.md Migrace na Debian PHP autoloader systém 2026-03-03 23:31:36 +01:00

CSAS Authorize

CSAS Auhorize Logo GitHub

This application provides a simple way to authorize your application with CSAS API.

Installation

sudo apt install lsb-release wget apt-transport-https bzip2


wget -qO- https://repo.vitexsoftware.com/keyring.gpg | sudo tee /etc/apt/trusted.gpg.d/vitexsoftware.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/vitexsoftware.gpg]  https://repo.vitexsoftware.com  $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update

sudo apt install csas-authorize

Usage

  1. Register your application at CSAS Developer Portal
  2. Create new application and get your client_id and client_secret
  3. Open in browser csas-authorize and fill in your client_id and client_secret
  4. Open your browser and authorize your application

'Apps' Main screen with list of your applications registered at CSAS Developer Portal

App One application can have multiple tokens

'Token' Once is token created you can see it's details. Each Refresh Token can have multiple Access Tokens. Refresh token is valid for 180 days and Access Token for 5 minutes.

Command line usage

Usage: csas-access-token [options]

Token Operations:
  --tokenId, -t <ID>   The token ID (required for token operations)
  --output, -o <FILE>  The output file (optional)
  --environment, -e    The environment file with DB_* fields (optional)
  --list, -l           List available tokens
  --json, -j           Export token data in JSON format
  --accesTokenKey, -a  Specify custom Access Token key instead of CSAS_ACCESS_TOKEN
  --sandboxModeKey, -s Specify custom SandBox Mode key instead of CSAS_SANDBOX_MODE

Application Operations:
  --export, -x <ID>    Export application data in Developer Portal format
  --import, -i <JSON>  Import application data from JSON string
  --file <FILE>        Import application data from JSON file
  --example            Show example JSON format for import

General:
  --help, -h           Show help message

Examples:
  # Token operations
  csas-access-token -t 71004963-e3d4-471f-96fc-1aef79d17ec1 -o .env
  csas-access-token --list --json

  # Application export/import
  csas-access-token --export=1 --output=backup.json
  csas-access-token --file=backup.json
  csas-access-token --import='{"name":"Test", "id":"uuid", ...}'
  csas-access-token --example

If there is no output file specified, the access token is printed to the standard output. Use the --json option to export token data or the token list in JSON format.

Development

We use two SQL tables to store data. For production we use MariaDB and for development we use SQLite.

Table application

+--------------------------+------------------+------+-----+---------------------+-------------------------------+
| Field                    | Type             | Null | Key | Default             | Extra                         |
+--------------------------+------------------+------+-----+---------------------+-------------------------------+
| id                       | int(11) unsigned | NO   | PRI | NULL                | auto_increment                |
| uuid                     | char(36)         | YES  |     | NULL                |                               |
| name                     | varchar(255)     | YES  |     | NULL                |                               |
| logo                     | varchar(255)     | YES  |     | NULL                |                               |
| sandbox_client_id        | char(36)         | YES  |     | NULL                |                               |
| sandbox_client_secret    | varchar(255)     | YES  |     | NULL                |                               |
| sandbox_redirect_uri     | varchar(255)     | YES  |     | NULL                |                               |
| sandbox_api_key          | char(36)         | YES  |     | NULL                |                               |
| production_client_id     | char(36)         | YES  |     | NULL                |                               |
| production_client_secret | varchar(255)     | YES  |     | NULL                |                               |
| production_redirect_uri  | varchar(255)     | YES  |     | NULL                |                               |
| production_api_key       | char(36)         | YES  |     | NULL                |                               |
| created_at               | timestamp        | YES  |     | current_timestamp() |                               |
| updated_at               | timestamp        | YES  |     | current_timestamp() | on update current_timestamp() |
+--------------------------+------------------+------+-----+---------------------+-------------------------------+

Table token

+----------------+------------------------------+------+-----+---------------------+-------------------------------+
| Field          | Type                         | Null | Key | Default             | Extra                         |
+----------------+------------------------------+------+-----+---------------------+-------------------------------+
| id             | int(11) unsigned             | NO   | PRI | NULL                | auto_increment                |
| application_id | int(11)                      | NO   |     | NULL                |                               |
| environment    | enum('sandbox','production') | YES  |     | NULL                |                               |
| access_token   | varchar(550)                 | YES  |     | NULL                |                               |
| refresh_token  | varchar(550)                 | YES  |     | NULL                |                               |
| expires_in     | int(11)                      | YES  |     | NULL                |                               |
| scope          | varchar(255)                 | YES  |     | NULL                |                               |
| created_at     | timestamp                    | YES  |     | current_timestamp() |                               |
| updated_at     | timestamp                    | YES  |     | current_timestamp() | on update current_timestamp() |
| uuid           | char(36)                     | YES  |     | NULL                |                               |
+----------------+------------------------------+------+-----+---------------------+-------------------------------+

Data Import/Export with Developer Portal

CSAS Authorize supports bidirectional data flow with CSAS Developer Portal format for easy migration and backup.

Import from Developer Portal

Web Interface

  1. Navigate to the main page and click "Import from Developer Portal"
  2. Upload a JSON file or paste JSON data directly
  3. The application will be automatically imported and saved

Command Line

# Import from JSON file
csas-access-token --file ./example-import.json

# Import from JSON string  
csas-access-token --import '{"name":"My App", "id":"uuid", ...}'

# Show example JSON format
csas-access-token --example

Export to Developer Portal Format

Command Line

# Export application by ID to stdout
php libexec/csas-access-token.php --export=1

# Export application by UUID to file
php libexec/csas-access-token.php --export=71004963-e3d4-471f-96fc-1aef79d17ec1 --output=backup.json

# Short form using -x option
php libexec/csas-access-token.php -x 1 -o export.json

JSON Format

The import/export system uses a standardized JSON format compatible with Developer Portal data:

{
  "name": "Application Name",
  "id": "application-uuid-from-portal",
  "logoUrl": "https://example.com/logo.png",
  "email": "developer@example.com",
  "sandbox": {
    "clientId": "sandbox-client-uuid",
    "clientSecret": "sandbox-client-secret",
    "apiKey": "sandbox-api-key-uuid",
    "redirectUri": "https://myapp.example.com/sandbox/callback"
  },
  "production": {
    "clientId": "production-client-uuid", 
    "clientSecret": "production-client-secret",
    "apiKey": "production-api-key-uuid",
    "redirectUri": "https://myapp.example.com/production/callback"
  }
}

Bidirectional Workflow

# Export from one instance
csas-access-token --export=1 --output=backup.json

# Import to another instance (or same instance)
csas-access-token --file backup.json

For detailed documentation: