Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external authentication mechanism #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fredipevcin
Copy link

No description provided.

@Neustradamus
Copy link
Member

@fredipevcin: Why have you closed your PR?

@fredipevcin
Copy link
Author

@Neustradamus: because there were no activity.

@Neustradamus
Copy link
Member

@mattn: What do you think about this PR?

@mattn mattn reopened this Mar 2, 2023
@mattn
Copy link
Member

mattn commented Mar 2, 2023

Could you please fix conflict?

@Neustradamus
Copy link
Member

@fredipevcin: Have you seen the @mattn comment?

@mattn
Copy link
Member

mattn commented Nov 11, 2023

Could you please fix conflict?

@fredipevcin
Copy link
Author

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
Copy link
Author

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
Copy link
Author

@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
Copy link
Collaborator

mdosch commented Nov 24, 2023 via email

@Neustradamus
Copy link
Member

@fredipevcin: Have you seen the @mdosch comment?

@Neustradamus
Copy link
Member

@fredipevcin: What is your email address?

@mdosch
Copy link
Collaborator

mdosch commented Jan 8, 2024

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

@@ -181,6 +181,9 @@ type Options struct {
// provided to the server as the xmlns:auth attribute of the OAuth2 authentication request.
OAuthXmlNs string

// AuthExternal will be chosen if this is set to true and if server supports it
AuthExternal bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Mechanism could also be used for setting auth to EXTERNAL: https://github.com/xmppo/go-xmpp/blob/master/xmpp.go#L234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants