Download the PHP package thefunpower/flarum-ext-api-login without Composer
On this page you can find all versions of the php package thefunpower/flarum-ext-api-login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download thefunpower/flarum-ext-api-login
More information about thefunpower/flarum-ext-api-login
Files in thefunpower/flarum-ext-api-login
Download thefunpower/flarum-ext-api-login
More information about thefunpower/flarum-ext-api-login
Files in thefunpower/flarum-ext-api-login
Vendor thefunpower
Package flarum-ext-api-login
Short Description Create aes encode data for login
License Apache-2.0
Package flarum-ext-api-login
Short Description Create aes encode data for login
License Apache-2.0
Keywords flarum
Please rate this library. Is it a good library?
Informations about the package flarum-ext-api-login
Flarum AES Login
Installation
Install with composer:
Updating
Setting
Create Aes Login Data
AesEncode
function
function flarum_aes_encode($data = [],$key,$iv){
$data = json_encode($data);
return @base64_encode(openssl_encrypt($data, 'AES-128-CBC', $key, 1, $iv));
}
Login
$flarum_url = 'http://127.0.0.1:5000';
$data = [
'nid'=>'third_user_id_1001',
'name'=>'admin',
'tag' =>'rand',
'created_at'=>time(),
];
$data = flarum_aes_encode($data);
$token = urlencode(base64_encode($data));
$url = $flarum_url.'/api/v2/login-token?token='.$token;
nid
|| name
must has one
using $url
in your iframe.
Register User Account
$flarum_url = 'http://127.0.0.1:5000';
$data = [
'nid'=>'third_user_id_1001',
'name'=>'admin',
'email'=>'[email protected]',
'tag' =>'rand',
'created_at'=>time(),
];
$data = flarum_aes_encode($data);
$token = urlencode(base64_encode($data));
$url = $flarum_url.'/api/v2/login-token?token='.$token;
nid
is unique on third platform
Logout
/api/v2/logout
Links
All versions of flarum-ext-api-login with dependencies
PHP Build Version
Package Version
The package thefunpower/flarum-ext-api-login contains the following files
Loading the files please wait ....