Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function convertToEncryptedAccessToken() |
||
28 | { |
||
29 | return (new Builder()) |
||
30 | ->setAudience($this->getClient()->getIdentifier()) |
||
31 | ->setId($this->getIdentifier(), true) |
||
32 | ->setIssuedAt(time()) |
||
33 | ->setNotBefore(time()) |
||
34 | ->setExpiration($this->getExpiryDateTime()->getTimestamp()) |
||
35 | ->setSubject($this->getUserIdentifier()) |
||
36 | ->set('scopes', $this->getScopes()) |
||
37 | ->sign(new Sha256(), new Key($this->privateKey->getKeyPath(), $this->privateKey->getPassPhrase())) |
||
38 | ->getToken(); |
||
39 | } |
||
40 | |||
49 |