Resolves #2. Implemented authlib-injector support

This commit is contained in:
ErickSkrauch
2021-03-03 15:04:42 +01:00
parent 10ab237d1d
commit 4856695940
17 changed files with 505 additions and 87 deletions

View File

@ -85,7 +85,7 @@ class SessionController extends Controller {
$account = $hasJoinedForm->hasJoined();
$textures = new Textures($account);
return $textures->getMinecraftResponse();
return $textures->getMinecraftResponse(true);
}
public function actionHasJoinedLegacy(): string {
@ -109,11 +109,12 @@ class SessionController extends Controller {
/**
* @param string $uuid
* @param string $unsigned
*
* @return array|null
* @throws IllegalArgumentException
*/
public function actionProfile(string $uuid): ?array {
public function actionProfile(string $uuid, string $unsigned = null): ?array {
try {
$uuid = Uuid::fromString($uuid)->toString();
} catch (\InvalidArgumentException $e) {
@ -127,7 +128,7 @@ class SessionController extends Controller {
return null;
}
return (new Textures($account))->getMinecraftResponse();
return (new Textures($account))->getMinecraftResponse($unsigned === 'false');
}
}