weedeej/authspace

Valorant客户端认证包装器

dev-master 2022-02-03 11:29 UTC

This package is auto-updated.

Last update: 2024-09-29 06:20:20 UTC


README

一个用于为Valorant客户端API进行用户认证的PHP包装器

如何安装

composer require weedeej/authspace:dev-master

用法

使用用户名和密码进行认证

use Weedeej\AuthSpace\Authentication;

$authObject = new Authentication(["username"=>"myUsername69",
                       		  "password"=>"s3cuReP4ss420",
                       		  "shard"=>"ap"]);
$authTokens = $authObject->authByUsername(); //Password is the most required key here.

使用令牌进行认证

use Weedeej\AuthSpace\Authentication;

$authObject = new Authentication(["username"=>"token.fetched.from.my.other.repo",
                         	  "shard"=>"ap"]); 
$authTokens = $authObject->authByToken();//If password is defined, 
					 //this will return an error.

记住Cookies

/*Remembering Cookies not credentials for Re-auth

NOTE: "remember" should be set on true*/
const remember = ["username"=>"myUsername69",
                  "password"=>"s3cuReP4ss420",
                  "shard"=>"ap",
                  "remember"=>true];

public function rememberMe(){
    $authObject = new Authentication(self::remember);
    $authTokens = $authObj->authByUsername();
    return $authTokens;
}

/* Parameters on Authentication object should be 'null' */
public function reAuth(){
    $authObject = new Authentication();
    $authTokens = $authObj->reAuth();
    return $authTokens;
}

要获取所需的令牌,有无数种方法可以获取它。但我推荐我的项目VTACCESS,因为它复制该令牌而不是显示它。

许可证

MIT

免责声明

我对该项目被用于任何非法活动不承担责任。

此存储库中的材料、端点以及任何其他功能均归Riot Games所有,且本项目与Riot Games无任何关联或获得其支持。