xmppo / go-xmpp

Go XMPP Library (From Yasuhiro Matsumoto and based on the code from Russ Cox)
https://golang.org/
BSD 3-Clause "New" or "Revised" License
527 stars 170 forks source link

Add external authentication mechanism #101

Open fredipevcin opened 6 years ago

Neustradamus commented 4 years ago

@fredipevcin: Why have you closed your PR?

fredipevcin commented 4 years ago

@Neustradamus: because there were no activity.

Neustradamus commented 1 year ago

@mattn: What do you think about this PR?

mattn commented 1 year ago

Could you please fix conflict?

Neustradamus commented 10 months ago

@fredipevcin: Have you seen the @mattn comment?

mattn commented 10 months ago

Could you please fix conflict?

fredipevcin commented 10 months ago

Hey, I will try to fix this as soon as possible (week or 2). You are welcome to do it otherwise I will when time allows me.

fredipevcin commented 9 months ago

Had an issue with tests.. so I removed them. If you have a suggestion how to add them, let me know.

Another thing I noticed during the testing. If server respond with multiple mechanism then the first one will be selected (PLAIN). Not sure if this is good thing.

<stream:stream xmlns='jabber:client'
       xmlns:stream='http://etherx.jabber.org/streams'
       to='domain'
       version='1.0'>
    <stream:features>
        <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
            <mechanism>PLAIN</mechanism>
            <mechanism>X-OAUTH2</mechanism>
        </mechanisms>
    </stream:features>
fredipevcin commented 9 months ago

@Neustradamus @mattn If this is good enough for you you can merge it. It's been a long time since I use this. I can't even test it.

mdosch commented 9 months ago

It should prefer SCRAM mechanisms over PLAIN. If you want to use OAUTH or EXTERNAL I guess you'll tell the lib to do so by the setting.

I have no idea about tests. Maybe @mattn knows more.

Am 24. November 2023 12:59:01 UTC schrieb Fredi Pevcin @.***>:

Had an issue with tests.. so I removed them. If you have a suggestion how to add them, let me know.

Another thing I noticed during the testing. If server respond with multiple mechanism then the first one will be selected (PLAIN). Not sure if this is good thing.

<stream:stream xmlns='jabber:client'
     xmlns:stream='http://etherx.jabber.org/streams'
     to='domain'
     version='1.0'>
  <stream:features>
      <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
          <mechanism>PLAIN</mechanism>
          <mechanism>X-OAUTH2</mechanism>
      </mechanisms>
  </stream:features>
Neustradamus commented 9 months ago

@fredipevcin: Have you seen the @mdosch comment?

Neustradamus commented 8 months ago

@fredipevcin: What is your email address?

mdosch commented 8 months ago

@fredipevcin I also don't have a server using external authentication and am therfore also unable to test it. :(