go-irc / irc

A simple go irc library meant to be a building block for other projects
MIT License
142 stars 17 forks source link

Handle SASL auth #57

Open belak opened 7 years ago

belak commented 7 years ago

Docs

https://ircv3.net/specs/extensions/sasl-3.1.html https://ircv3.net/specs/extensions/sasl-3.2.html

Current Issues (And Possible Solutions)

There's no way to hook into the registration process. The way we handle CAP negotiation should be made more generic (hopefully so there's an extensible way to ensure something happens before registration), we should add a method of handling SASL auth before registration is done, and we should possibly expose the pre-registration system to the user.

terinjokes commented 6 years ago

@belak Do you have a recommended plan, if someone were to implement this? I'm no expert in SASL, and certainly not SASL in the context of IRC, but it doesn't seem like the CAP implementation here is flexible enough to support it entirely as a user.

belak commented 6 years ago

As far as I'm aware (it's been a while since I've looked at implementing this since I haven't needed it) it's not the CAP implementation as much as it is that there's no current way to specify that something needs to be handled before registration is complete. I've updated the original comment with links to docs and some suggestions.

terinjokes commented 6 years ago

@belak I think we're in agreement, just stating it more-or-less differently.

danopia commented 5 years ago

I see you mentioned extending the CAP API to support arbitrary CAPs that need to be further discussed at registration time -- you'd prefer that over a change to specifically slot in a SASL credential?

lavagetto commented 2 years ago

@belak I would be interested in helping add SASL support to the library, as I want to convert my bots to use a base library that understands ircv3. Would you accept a patch adding specifically just SASL support or do you have other plans?

Happy to help move that forward either way.

belak commented 2 years ago

Yes! I would be happy to accept a patch! Ideally it would involve an improvement to CAP support, but SASL seems important enough that I'd be willing to accept it as a stand-alone change.

I actually forgot about this, but I'll aim to get the develop branch merged back to master some time in the next week...