From e1e310592ea03aa8a68728d8c15d7f04cf29f957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Leuilliot?= Date: Sat, 14 Nov 2020 16:15:05 +0100 Subject: [PATCH] feat: provide a way to determine is a request is authenticated (#66) --- .styleci.yml | 2 +- src/Eseye.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.styleci.yml b/.styleci.yml index 1d09f17..6f69d56 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -6,7 +6,7 @@ enabled: - no_empty_comment disabled: - - psr2_braces + - psr12_braces - concat_without_spaces - phpdoc_no_package - no_blank_lines_after_class_opening diff --git a/src/Eseye.php b/src/Eseye.php index 5544795..21cc9ed 100644 --- a/src/Eseye.php +++ b/src/Eseye.php @@ -45,7 +45,7 @@ class Eseye /** * The Eseye Version. */ - const VERSION = '2.2.2'; + const VERSION = '2.3.0'; /** * @var \Seat\Eseye\Containers\EsiAuthentication @@ -164,6 +164,14 @@ public function setAuthentication(EsiAuthentication $authentication): self return $this; } + /** + * @return bool + */ + public function isAuthenticated(): bool + { + return ! is_null($this->authentication); + } + /** * @param string $refreshToken *