weedeej/authspace

Wrapper for Valorant Client Auth

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

This package is auto-updated.

Last update: 2025-07-29 02:24:22 UTC


README

A php wrapper for authenticating user for Valorant Client APIs

How to install

composer require weedeej/authspace:dev-master

Usage

Auth using username and password

use Weedeej\AuthSpace\Authentication;

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

Auth using Tokens

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.

Remembering 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;
}

To get the token required, There so many ways to get it. But I recommend my project VTACCESS as it copies that token instead of being displayed.

License

MIT

Disclaimer

I am not responsible on any illegal activites this project will be used for.

Materials, Endpoints, and any other functions here in this repository are owned by Riot Games and there is no way this project is affiliated or endorsed by Riot Games.