Download the PHP package bildvitta/iss-sdk without Composer

On this page you can find all versions of the php package bildvitta/iss-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package iss-sdk

Latest Version on Packagist Total Downloads

Introduction

The ISS (International Space Station) aims to be a space station (client) of connection between the microservices of its ecosystem and the authentication and permissions microservice of the user that here is called in the script as Hub.permissions modules / microservices (Hub)

Installation

You can install the package via composer:

For everything to work perfectly in addition to having the settings file published in your application, run the command below:

Configuration

This is the contents of the published config file:

With the configuration file hub.php published in your configuration folder it is necessary to create environment variables in your .env file:

Change permission and role model from spatie/laravel-permissions

You should change the default spatie/laravel-permissions models to ours, as we have some substantial changes to the use of Role and Permission.

If you already have a change to these models, just extend our classes to have the correct functionalities.

Add Trait on User Model

And remember to add the BildVitta\Hub\Traits\User\HasCompanyLinks Trait in the Users model.

Remembering that this trait already has Spatie\Permission\Traits\HasRoles by default, so you can remove the Spatie\Permission\Traits\HasRoles trait from your user model.

Usage

All requests made to the ISS Service will return an instance of \Illuminate\Http\Client\Response, which implements the PHP ArrayAccess interface, allowing you to access JSON response data directly in the response

This also means that a variety of methods that can be used to inspect the response, follow some below:

``

Initialize ISS Service.

As there are several ways to program, there are also several ways to start the ISS Service.

Below are some ways to start the Service.

Authenticating User

To authenticate the Hub user in your module, it is necessary to use the middleware hub.auth = \ BildVitta \ Hub \ Middleware \ AuthenticateHubMiddleware.

It will validate the token and create, if it does not exist, the user of the token in its user table.

``

When we installed the package, we created the hub_uuid column in your user table.

Tf it is not possible to authenticate, the middleware will return 401.

User Authenticated

To access the token's user data directly, there is the \BildVitta\Hub\Contracts\Resources\AuthResourceContract interface

Check Token

It is verified whether the token passed by parameter or previously loaded in the ISS Service is valid.

Example of use:

Get Permissions

It is possible to obtain ALL the permissions of the token uploaded to the ISS Service.

Example of use:

Adding permission scope to entity listing.

Now we have added a scope that filters by the permission level of the logged in user. To use it is very simple, just add in the global scopes the PermissionScope class passing the permission that the user has to have, and then the magic happens ;D

Code example:

Remembering that the scope name has to be permission, if not, it doesn't work <3

Notifications

Make sure the BroadcastServiceProvider is enabled in config/app.php

Add the ABLY_KEY key as an environment variable (ask your coordinator for this key)

Then, set the BROADCAST_CONNECTION environment variable to ably in your application's .env file:

Check the routes/channels.php file if the private channel authentication route is correct.

Ensure that the $user->uuid is the same as that used in the hub, otherwise it may result in a 403 in this private channel authentication api.

To finish, go to the BroadcastServiceProvider file and change it to this code.

Testing

coming soon...

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of iss-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1|^8.2|^8.3
ably/ably-php Version ^1.1
illuminate/contracts Version ^7.0|^8.0|^9.0|^10.0|^11.0
spatie/laravel-permission Version ^4.0|^5.0|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bildvitta/iss-sdk contains the following files

Loading the files please wait ....