larastuffs/vidyo-token

Generate access tokens for Vidyo.io

1.0.1 2020-09-20 20:51 UTC

This package is not auto-updated.

Last update: 2024-10-28 16:19:26 UTC


README

Packagist Version License

Generate access tokens for Vidyo.io.

To connect to Vidyo.io, the VidyoClient SDK needs to pass a token. A token is a short-lived authentication credential that grants access to the Vidyo.io service on behalf of the developer to a specific user. When an endpoint requests access to the service, your application backend should generate a token and pass it on to the client application.

Contents

Installation and setup

You can install this package via composer using:

composer require larastuffs/vidyo-token

To publish the config file to config/vidyo.php run:

php artisan vendor:publish --provider="LaraStuffs\VidyoToken\VidyoTokenServiceProvider"

Go to config/vidyo.php and change the value of developer_key and app_id for your developer key and application ID.

To do list

  • Accept vCard

Usage

You can use the static method LaraStuffs\VidyoToken\VidyoToken::generate(string $username = null, int $seconds = null): string to generate the token. If the arguments are null, the method gets the values defined in config/vidyo.php.

<?php
use LaraStuffs\VidyoToken\VidyoToken;

$username = 'LaraStuffs';

echo VidyoToken::generate($username);
// Result: cHJvdmlzaW9uAExhcmFTdHVmZnNAADYzNzU5...

Contributing

Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.