Skip to content

Commit a4928ae

Browse files
committed
bug fix
1 parent 278e472 commit a4928ae

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

service/src/main.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* You should have received a copy of the GNU Affero General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
* */
18-
import crypto from "crypto";
1918
import "dotenv/config";
2019
import http from "http";
2120

@@ -54,9 +53,8 @@ async function DownloadPublicKey()
5453
});
5554

5655
const string = response.body.toString("utf-8");
57-
const parsed = JSON.parse(string);
5856

59-
return parsed.keys[0];
57+
return JSON.parse(string);
6058
}
6159

6260
async function BootstrapServer()
@@ -66,11 +64,8 @@ async function BootstrapServer()
6664
requestHandlerChain.AddBodyParser();
6765

6866
const jwtVerifier = new HTTP.JWTVerifier(
69-
crypto.createPublicKey({
70-
key: await DownloadPublicKey(),
71-
format: 'jwk'
72-
}),
73-
"http://" + CONFIG_OIDP_ENDPOINT, //TODO WHY HTTP AND NOT HTTPS?
67+
await DownloadPublicKey(),
68+
"https://" + CONFIG_OIDP_ENDPOINT,
7469
true
7570
);
7671
const streamingService = GlobalInjector.Resolve(StreamingService);

0 commit comments

Comments
 (0)