junlarsen / league-connect

:electric_plug: Node.js HTTP/1.1, HTTP/2.0 and WebSocket interface to the League of Legends Client APIs
https://www.npmjs.com/package/league-connect
MIT License
156 stars 24 forks source link

Posibility to send the League of legends certificate.pem as a string #95

Closed RenzoBeux closed 1 year ago

RenzoBeux commented 1 year ago

Hi, im writing an electron app and im using your library for API comms. Right now I'm having the following problem, on dev env I can use your library without any problem but when I build and package using electron-builder I have no way to access certificate.pem. So I was wandering if there is any way to send the authenticate method a string which is the certificate and in case this option is not provided use the default readFile. If you think it is a good idea I could do a pull request for it to work like this!

junlarsen commented 1 year ago

Hi, thanks for asking!

The authenticate method (and thus everything else) can provide a user-selected certificate as a plain string of the certificate (including ---- BEGIN and ---- END clauses) with the certificate option as documented in https://github.com/matsjla/league-connect#authenticate

You can see the test case on how to use this option https://github.com/matsjla/league-connect/blob/master/src/tests/authentication.test.ts#L52

Let me know if you have any more troubles!

RenzoBeux commented 1 year ago

How the f* didn't see that option, sorry for bothering and thanks for the fast reply!

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Mats Larsen @.> Sent: Saturday, November 26, 2022 10:11:01 PM To: matsjla/league-connect @.> Cc: RenzoBeux @.>; Author @.> Subject: Re: [matsjla/league-connect] Posibility to send the League of legends certificate.pem as a string (Issue #95)

Hi, thanks for asking!

The authenticate method (and thus everything else) can provide a user-selected certificate as a plain string of the certificate (including ---- BEGIN and ---- END clauses) with the certificate option as documented in https://github.com/matsjla/league-connect#authenticate

You can see the test case on how to use this option https://github.com/matsjla/league-connect/blob/master/src/tests/authentication.test.ts#L52

Let me know if you have any more troubles!

— Reply to this email directly, view it on GitHubhttps://github.com/matsjla/league-connect/issues/95#issuecomment-1328145458, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALOC3K7QNFVHFAR2AOU2L2DWKKYKLANCNFSM6AAAAAASMICUOM. You are receiving this because you authored the thread.Message ID: @.***>