File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 27
27
use Psr \Log \LoggerInterface ;
28
28
use Psr \SimpleCache \CacheInterface ;
29
29
use Seat \Eseye \Access \AccessInterface ;
30
+ use Seat \Eseye \Access \AccessTokenRefresher ;
31
+ use Seat \Eseye \Access \AccessTokenRefresherInterface ;
30
32
use Seat \Eseye \Access \CheckAccess ;
31
33
use Seat \Eseye \Containers \EsiAuthentication ;
32
34
use Seat \Eseye \Containers \EsiResponse ;
@@ -151,6 +153,15 @@ public function setAccessChecker(AccessInterface $checker): self
151
153
return $ this ;
152
154
}
153
155
156
+
157
+ /**
158
+ * @throws InvalidContainerDataException
159
+ */
160
+ public function getAccessTokenRefresher (): AccessTokenRefresherInterface
161
+ {
162
+ return $ this ->getConfiguration ()->getAccessTokenRefresher ();
163
+ }
164
+
154
165
/**
155
166
* @return \Seat\Eseye\Fetchers\FetcherInterface
156
167
*
@@ -536,4 +547,14 @@ public function page(int $page): self
536
547
537
548
return $ this ;
538
549
}
550
+
551
+ /**
552
+ * @return EsiAuthentication
553
+ * @throws InvalidAuthenticationException
554
+ * @throws InvalidContainerDataException
555
+ */
556
+ public function getValidAccessToken (): EsiAuthentication
557
+ {
558
+ return $ this ->getAccessTokenRefresher ()->getValidAccessToken ($ this ->getAuthentication ());
559
+ }
539
560
}
You can’t perform that action at this time.
0 commit comments