@@ 159-172 (lines=14) @@ | ||
156 | * @throws Exception\Runtime |
|
157 | * @return string |
|
158 | */ |
|
159 | protected function own_private_key() |
|
160 | { |
|
161 | try |
|
162 | { |
|
163 | $key = new Key(); |
|
164 | $private_key = $key->get($this->jwt['our_privkey']); |
|
165 | } |
|
166 | catch (\Exception $e) |
|
167 | { |
|
168 | throw new Exception\Runtime('The file with the private key was '.$e->getMessage().'!'); |
|
169 | } |
|
170 | ||
171 | return $private_key; |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * Encode payload and return token |
@@ 109-122 (lines=14) @@ | ||
106 | * @throws Exception\Runtime |
|
107 | * @return string Public key |
|
108 | */ |
|
109 | protected function uapay_public_key() |
|
110 | { |
|
111 | try |
|
112 | { |
|
113 | $key = new Key(); |
|
114 | $public_key = $key->get($this->jwt['UAPAY_pubkey']); |
|
115 | } |
|
116 | catch (\Exception $e) |
|
117 | { |
|
118 | throw new Exception\Runtime('The file with the public key was '.$e->getMessage().'!'); |
|
119 | } |
|
120 | ||
121 | return $public_key; |
|
122 | } |
|
123 | ||
124 | /** |
|
125 | * Decode token |