Skip to content

Commit f21c280

Browse files
committed
update
1 parent 2f67b9e commit f21c280

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

src/Service/Jwt.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,19 @@ public function user()
9696
{
9797
return $this->app->get('jwt.user');
9898
}
99+
100+
public function type()
101+
{
102+
return $this->app->get('jwt.token')->getType();
103+
}
104+
105+
public function refreshTTL()
106+
{
107+
return $this->app->get('jwt.token')->getRefreshTTL();
108+
}
109+
110+
public function ttl()
111+
{
112+
return $this->app->get('jwt.token')->getRefreshTTL();
113+
}
99114
}

src/Service/Token.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,22 @@ public function verify(string $token): ?bool
212212
*
213213
* @return string
214214
*/
215-
protected function getRequestToken(): string
215+
public function getRequestToken(): string
216216
{
217217
$requestToken = new RequestToken($this->app);
218218

219219
$token = $requestToken->get($this->config->getTokenType());
220220

221221
return $token;
222222
}
223+
224+
public function getType(): string
225+
{
226+
return $this->config->getTokenType();
227+
}
228+
229+
public function getRefreshTTL()
230+
{
231+
return $this->config->getRefreshTTL();
232+
}
223233
}

src/Service/User.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function resolveConfig(): array
4242
return $options;
4343
}
4444

45-
protected function getClass(): string
45+
public function getClass(): string
4646
{
4747
$store = $this->getStore();
4848
$class = $this->config->getClass();
@@ -53,6 +53,11 @@ protected function getClass(): string
5353
return $class;
5454
}
5555

56+
public function getBind()
57+
{
58+
return $this->config->getBind();
59+
}
60+
5661
public function get()
5762
{
5863
$class = $this->getClass();

0 commit comments

Comments
 (0)